From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Biju Das <biju.das.au@gmail.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH 2/2] media: mt9p031: Drop CONFIG_OF ifdeffery
Date: Fri, 23 Aug 2024 18:55:54 +0300 [thread overview]
Message-ID: <20240823155554.GS26098@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230910160126.70122-3-biju.das.jz@bp.renesas.com>
Hi Biju,
Thank you for the patch.
On Sun, Sep 10, 2023 at 05:01:26PM +0100, Biju Das wrote:
> Drop of_match_ptr() from mt9p031_i2c_driver and get rid of ugly CONFIG_OF
> if check. This slightly increases the size of mt9p031_i2c_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 <biju.das.jz@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> drivers/media/i2c/mt9p031.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c
> index 540cb519915c..91d5de5b95f0 100644
> --- a/drivers/media/i2c/mt9p031.c
> +++ b/drivers/media/i2c/mt9p031.c
> @@ -15,6 +15,7 @@
> #include <linux/gpio/consumer.h>
> #include <linux/i2c.h>
> #include <linux/log2.h>
> +#include <linux/mod_devicetable.h>
> #include <linux/module.h>
> #include <linux/of.h>
> #include <linux/of_graph.h>
> @@ -1222,7 +1223,6 @@ static const struct i2c_device_id mt9p031_id[] = {
> };
> MODULE_DEVICE_TABLE(i2c, mt9p031_id);
>
> -#if IS_ENABLED(CONFIG_OF)
> static const struct of_device_id mt9p031_of_match[] = {
> { .compatible = "aptina,mt9p006", .data = (void *)MEDIA_BUS_FMT_SGRBG12_1X12 },
> { .compatible = "aptina,mt9p031", .data = (void *)MEDIA_BUS_FMT_SGRBG12_1X12 },
> @@ -1230,11 +1230,10 @@ static const struct of_device_id mt9p031_of_match[] = {
> { /* sentinel */ }
> };
> MODULE_DEVICE_TABLE(of, mt9p031_of_match);
> -#endif
>
> static struct i2c_driver mt9p031_i2c_driver = {
> .driver = {
> - .of_match_table = of_match_ptr(mt9p031_of_match),
> + .of_match_table = mt9p031_of_match,
> .name = "mt9p031",
> },
> .probe = mt9p031_probe,
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2024-08-23 15:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-10 16:01 [PATCH 0/2] Match data improvements for mt9p031 driver Biju Das
2023-09-10 16:01 ` [PATCH 1/2] media: mt9p031: Extend match support for OF tables Biju Das
2023-09-11 9:06 ` Jacopo Mondi
2023-09-11 9:14 ` Biju Das
2023-09-11 9:25 ` Jacopo Mondi
2023-09-13 13:45 ` Jacopo Mondi
2024-08-23 15:55 ` Laurent Pinchart
2024-08-24 15:55 ` Laurent Pinchart
2024-08-24 15:56 ` Laurent Pinchart
2024-08-24 16:11 ` Biju Das
2023-09-10 16:01 ` [PATCH 2/2] media: mt9p031: Drop CONFIG_OF ifdeffery Biju Das
2023-09-11 9:07 ` Jacopo Mondi
2024-08-23 15:55 ` Laurent Pinchart [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240823155554.GS26098@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=biju.das.au@gmail.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox