Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp272125rdh; Sat, 23 Sep 2023 09:39:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGftLV0dWT4ZGTQPbDvsu9UstpSI1WlQxccxz3D2wa0+nRGZl0ZQIffAgXdbzRet4sdpHzS X-Received: by 2002:a05:6a21:18a:b0:13a:6bca:7a84 with SMTP id le10-20020a056a21018a00b0013a6bca7a84mr3657459pzb.44.1695487159008; Sat, 23 Sep 2023 09:39:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695487158; cv=none; d=google.com; s=arc-20160816; b=ywSa0AfHdm6OvZl2AIKmY7D+l+JyHsXcq/Do4P3TEXo0W5Z4mptg99eLV8spnT+jeZ ZHui9O90FGFQQJsdE3fL3nEy+4qJH6el6mRx70I0jyNnkBOkcr5LYgtbfhfvxAymYkpu oMZXBXNulia2w3cQWr/fz5dFizTFXQqWRSF2Ig+8eGvIDmSui53Tlbunl8PyQtBghlXf +95SKV2CIXdatOl8iG0dQHN0/yDo2IQwoPpt1Jxmlch6w6DFq+hlLw/zYejlMo1X7RTs jZ09DCkb3LMTVs73zyIABaYtq7FQcp5GnfbjugSfu5iprdkLjg23MZf6wxsMuv30XguO Fp2A== 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; bh=bsWsLqeUDRlVBSRZ0dtBfE/gYmIeHXJWe39ePQlLvak=; fh=8XHVssQkGTmj2o3ixJJcc9X3fkVzFlM7u16K5Pbqh9w=; b=KyywLgiwtC/ZGiV/3iTZgvAwrA1qe+jUqF+B60jAGk25R7bonwmtX0VwDIbGbzwF8/ XB1jtZ+IH5n80z8pDdAGiOUN+n3I3k7t+wBiAy2AL885UKzW84TbYtqpm2YLAG0D5j89 NyPI3GUdcM0hHrO1tWR09btTJ+Od81XtDxZNTxCm76EygdKonz9pouKX+MXyfYjzcEYp +Baba+KdEug+/vXW84QHvQrIqm0dfoega4347/STdWQOtCV5ExGLcR3+GL2jGsC8PzGa CNxPaRMdBcACtpjOzzO2jfhSijO8z0a4BQgPly55Y/qpqImqEpqVGFNc1PBtlxUG0T0P BAVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id fa25-20020a056a002d1900b00690ce34a02bsi6583808pfb.224.2023.09.23.09.39.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 09:39:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 07D9E80C5902; Sat, 23 Sep 2023 09:37:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229868AbjIWQhE (ORCPT + 99 others); Sat, 23 Sep 2023 12:37:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232019AbjIWQhB (ORCPT ); Sat, 23 Sep 2023 12:37:01 -0400 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E379A19E; Sat, 23 Sep 2023 09:36:54 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.03,171,1694703600"; d="scan'208";a="180728102" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 24 Sep 2023 01:36:54 +0900 Received: from localhost.localdomain (unknown [10.226.92.12]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id CD9DC401DDFD; Sun, 24 Sep 2023 01:36:51 +0900 (JST) From: Biju Das To: Mauro Carvalho Chehab Cc: Biju Das , Hans Verkuil , Jacopo Mondi , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Biju Das , Andy Shevchenko Subject: [PATCH v2 2/3] media: tvp541x: Drop CONFIG_OF ifdeffery Date: Sat, 23 Sep 2023 17:36:40 +0100 Message-Id: <20230923163641.31685-3-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230923163641.31685-1-biju.das.jz@bp.renesas.com> References: <20230923163641.31685-1-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 23 Sep 2023 09:37:19 -0700 (PDT) Drop of_match_ptr() from tvp514x_driver and get rid of ugly CONFIG_OF if check. This slightly increases the size of tvp514x_driver on non-OF system and shouldn't be an issue. Add mod_devicetable.h include. It also allows, in case if needed, to enumerate this device via ACPI with PRP0001 magic. Signed-off-by: Biju Das Reviewed-by: Jacopo Mondi --- v1->v2: * Added Rb tag from Jacopo. --- drivers/media/i2c/tvp514x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/tvp514x.c b/drivers/media/i2c/tvp514x.c index 4d0ffaa312c5..569a9437ec86 100644 --- a/drivers/media/i2c/tvp514x.c +++ b/drivers/media/i2c/tvp514x.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -1190,7 +1191,6 @@ static const struct i2c_device_id tvp514x_id[] = { }; MODULE_DEVICE_TABLE(i2c, tvp514x_id); -#if IS_ENABLED(CONFIG_OF) static const struct of_device_id tvp514x_of_match[] = { { .compatible = "ti,tvp5146", .data = tvp5146_init_reg_seq }, { .compatible = "ti,tvp5146m2", .data = tvp514xm_init_reg_seq }, @@ -1199,11 +1199,10 @@ static const struct of_device_id tvp514x_of_match[] = { { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, tvp514x_of_match); -#endif static struct i2c_driver tvp514x_driver = { .driver = { - .of_match_table = of_match_ptr(tvp514x_of_match), + .of_match_table = tvp514x_of_match, .name = TVP514X_MODULE_NAME, }, .probe = tvp514x_probe, -- 2.25.1