From nobody Fri Dec 19 03:31:55 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3852ACE7A89 for ; Sat, 23 Sep 2023 16:37:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232050AbjIWQhF (ORCPT ); Sat, 23 Sep 2023 12:37:05 -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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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[] =3D { }; MODULE_DEVICE_TABLE(i2c, tvp514x_id); =20 -#if IS_ENABLED(CONFIG_OF) static const struct of_device_id tvp514x_of_match[] =3D { { .compatible =3D "ti,tvp5146", .data =3D tvp5146_init_reg_seq }, { .compatible =3D "ti,tvp5146m2", .data =3D tvp514xm_init_reg_seq }, @@ -1199,11 +1199,10 @@ static const struct of_device_id tvp514x_of_match[]= =3D { { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, tvp514x_of_match); -#endif =20 static struct i2c_driver tvp514x_driver =3D { .driver =3D { - .of_match_table =3D of_match_ptr(tvp514x_of_match), + .of_match_table =3D tvp514x_of_match, .name =3D TVP514X_MODULE_NAME, }, .probe =3D tvp514x_probe, --=20 2.25.1