Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp8369779rwd; Tue, 20 Jun 2023 14:16:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5R4EiiRI8/yR0z+lorHgOmKzI8vHy0bkj7fakJuL/SgCrkIdbCo5uM049sX5oPi0dF13CT X-Received: by 2002:aca:b01:0:b0:39e:cefb:62f7 with SMTP id 1-20020aca0b01000000b0039ecefb62f7mr4693268oil.17.1687295817874; Tue, 20 Jun 2023 14:16:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687295817; cv=none; d=google.com; s=arc-20160816; b=E1gRUFw182MDK+RqkZ9ina5diysLzdKAxGiDiLiW0kf7rP8pgvuDQ8kXUfbeAMAPTu W+mJhn2nwA4gft8fzRvlgeNpnfTAg3w4dFue9Wp4PZJDBGSwcI6TxEb3rzkoNrNpP/l0 tgMUEtaUs/KXRn77lEIaIX8uQMTwhqCx3Q7K5T7P3VYwD1JiruPEmJfwgfd8TSOE3juU IKVHkuLdzisYz36qi4NGbCEIJ7zr8wfMqYCd8kvQ7syufateP5dwkbChd+Ro+nHqwrW/ ckUX30xGT39heU+z1+toar/MsLCjJHW1wgURIVTDPrGUEVjkQW/Z0E/hZh9Pmcq3jmRg Vcow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gv28SonaTvY+IZAU9KWpUGXhgm7C/j/DMqtWkl+5svE=; b=ntHPSQd9A7pw37YL70DJrLxeZHt9g29bFLeDvfReYuaS/6UgOngQtltydKHy0zuM1G Hn2yAaeNFUaPh3zTYTXlMzqCR2A5348/s/3l8/zVy75OYQ6OIcrWf2DvkcDodyucUU2D h85V6ocala8ywcXC/eYMnndqrGTqye2WmnyBzi48mb4w7/5KKfax2x19AmtQrBNQDhXM K1MUdBvrTUv73tsge5kUDzqq6NLilK3Az2HwdGL+S62Iu2xUziffGBNWwrxfaafRhvXM godSkyuERC+gEGMCinmJG1NDyBhBTEIEPgr5i6mTXciTUYOhW5E7LZvoTgzIlWMR2oE5 Y1ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jfrhnQdV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l1-20020a63be01000000b0054fd5b1776dsi2472346pgf.266.2023.06.20.14.16.43; Tue, 20 Jun 2023 14:16:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jfrhnQdV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230062AbjFTVDr (ORCPT + 99 others); Tue, 20 Jun 2023 17:03:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229903AbjFTVDq (ORCPT ); Tue, 20 Jun 2023 17:03:46 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 179B510F4; Tue, 20 Jun 2023 14:03:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687295025; x=1718831025; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Qy2nBFndB7zMhlWJ7jbpgbfuTUNl9LWdB5UOeqaAxkc=; b=jfrhnQdVvWzwyM/ilZwAcPreOLWNZrbj8zKQ2jO7qv8xNxtXuAIpoKWK 4oT6QzYbSUa+yTRWxxgbpJfHHyA8+in9PUawGxX3T4vywlVRl+WaXDnAJ eXqd87iE49uVHljnKAcPTU5Ioc/bNmu2TweFxEMBrBHUI5digDqcDuiRw YKc8aHKuh6uCUaaZrksxiJ904Csx4OHL8ZpzDCMNCMl9Df6JKIKoXnUuw 8IZs/YoK7w2gHTFgNBYWAEsoO/IpBhypg9OGPrUFrTg4FVbvqwnslkOnY 0fZFFxCAqS0f+UU6ACOsdRo/LHWjitoFs/BTsBYqXAJL/oGdxiRkxnc9I w==; X-IronPort-AV: E=McAfee;i="6600,9927,10747"; a="363405827" X-IronPort-AV: E=Sophos;i="6.00,258,1681196400"; d="scan'208";a="363405827" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2023 14:03:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10747"; a="888384781" X-IronPort-AV: E=Sophos;i="6.00,258,1681196400"; d="scan'208";a="888384781" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2023 14:03:31 -0700 Received: from punajuuri.localdomain (punajuuri.localdomain [192.168.240.130]) by kekkonen.fi.intel.com (Postfix) with ESMTP id CD3F811F89D; Wed, 21 Jun 2023 00:03:27 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.96) (envelope-from ) id 1qBiVS-002jLy-1Z; Wed, 21 Jun 2023 00:03:18 +0300 From: Sakari Ailus To: linux-media@vger.kernel.org Cc: Krzysztof Kozlowski , Joe Tessler , Hans Verkuil , Mauro Carvalho Chehab , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Thierry Reding , Jonathan Hunter , Manivannan Sadhasivam , Michael Tretter , Pengutronix Kernel Team , Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Rui Miguel Silva , Wenyou Yang , Bin Liu , Matthias Brugger , AngeloGioacchino Del Regno , Minghsiu Tsai , Houlong Wei , Andrew-CT Chen , Andrzej Pietrasiewicz , Jacek Anaszewski , Sylwester Nawrocki , Patrice Chotard , Yong Deng , Paul Kocialkowski , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , "Lad, Prabhakar" , Ezequiel Garcia , Philipp Zabel , Sean Young , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-rockchip@lists.infradead.org Subject: [PATCH v2 20/28] media: platform: jpeg: always reference OF data Date: Wed, 21 Jun 2023 00:03:08 +0300 Message-Id: <20230620210308.650986-1-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230312131318.351173-20-krzysztof.kozlowski@linaro.org> References: <20230312131318.351173-20-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Krzysztof Kozlowski The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). Signed-off-by: Krzysztof Kozlowski [Sakari Ailus: Rebased on media tree master, reword commit message, drop additional #if defined(CONFIG_OF)/#endif's.] Signed-off-by: Sakari Ailus --- drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c | 6 +----- drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c | 4 +--- drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c | 4 +--- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c index 4768156181c99..40cb3cb87ba17 100644 --- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c +++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c @@ -28,7 +28,6 @@ #include "mtk_jpeg_core.h" #include "mtk_jpeg_dec_parse.h" -#if defined(CONFIG_OF) static struct mtk_jpeg_fmt mtk_jpeg_enc_formats[] = { { .fourcc = V4L2_PIX_FMT_JPEG, @@ -102,7 +101,6 @@ static struct mtk_jpeg_fmt mtk_jpeg_dec_formats[] = { .flags = MTK_JPEG_FMT_FLAG_CAPTURE, }, }; -#endif #define MTK_JPEG_ENC_NUM_FORMATS ARRAY_SIZE(mtk_jpeg_enc_formats) #define MTK_JPEG_DEC_NUM_FORMATS ARRAY_SIZE(mtk_jpeg_dec_formats) @@ -1455,7 +1453,6 @@ static const struct dev_pm_ops mtk_jpeg_pm_ops = { SET_RUNTIME_PM_OPS(mtk_jpeg_pm_suspend, mtk_jpeg_pm_resume, NULL) }; -#if defined(CONFIG_OF) static int mtk_jpegenc_get_hw(struct mtk_jpeg_ctx *ctx) { struct mtk_jpegenc_comp_dev *comp_jpeg; @@ -1951,14 +1948,13 @@ static const struct of_device_id mtk_jpeg_match[] = { }; MODULE_DEVICE_TABLE(of, mtk_jpeg_match); -#endif static struct platform_driver mtk_jpeg_driver = { .probe = mtk_jpeg_probe, .remove_new = mtk_jpeg_remove, .driver = { .name = MTK_JPEG_NAME, - .of_match_table = of_match_ptr(mtk_jpeg_match), + .of_match_table = mtk_jpeg_match, .pm = &mtk_jpeg_pm_ops, }, }; diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c index 869068fac5e2f..baa7be58ce691 100644 --- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c +++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c @@ -39,7 +39,6 @@ enum mtk_jpeg_color { MTK_JPEG_COLOR_400 = 0x00110000 }; -#if defined(CONFIG_OF) static const struct of_device_id mtk_jpegdec_hw_ids[] = { { .compatible = "mediatek,mt8195-jpgdec-hw", @@ -47,7 +46,6 @@ static const struct of_device_id mtk_jpegdec_hw_ids[] = { {}, }; MODULE_DEVICE_TABLE(of, mtk_jpegdec_hw_ids); -#endif static inline int mtk_jpeg_verify_align(u32 val, int align, u32 reg) { @@ -653,7 +651,7 @@ static struct platform_driver mtk_jpegdec_hw_driver = { .probe = mtk_jpegdec_hw_probe, .driver = { .name = "mtk-jpegdec-hw", - .of_match_table = of_match_ptr(mtk_jpegdec_hw_ids), + .of_match_table = mtk_jpegdec_hw_ids, }, }; diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c index 71e85b4bbf127..244018365b6f1 100644 --- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c +++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c @@ -46,7 +46,6 @@ static const struct mtk_jpeg_enc_qlt mtk_jpeg_enc_quality[] = { {.quality_param = 97, .hardware_value = JPEG_ENC_QUALITY_Q97}, }; -#if defined(CONFIG_OF) static const struct of_device_id mtk_jpegenc_drv_ids[] = { { .compatible = "mediatek,mt8195-jpgenc-hw", @@ -54,7 +53,6 @@ static const struct of_device_id mtk_jpegenc_drv_ids[] = { {}, }; MODULE_DEVICE_TABLE(of, mtk_jpegenc_drv_ids); -#endif void mtk_jpeg_enc_reset(void __iomem *base) { @@ -377,7 +375,7 @@ static struct platform_driver mtk_jpegenc_hw_driver = { .probe = mtk_jpegenc_hw_probe, .driver = { .name = "mtk-jpegenc-hw", - .of_match_table = of_match_ptr(mtk_jpegenc_drv_ids), + .of_match_table = mtk_jpegenc_drv_ids, }, }; -- 2.39.2