lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <dgstv2on2hc2drl5ydnwz6ago6t7wwurgpwohuazx55ao2wtna@2smdk7sv2kty>
Date:   Mon, 11 Sep 2023 12:10:00 +0200
From:   Jacopo Mondi <jacopo.mondi@...asonboard.com>
To:     Biju Das <biju.das.jz@...renesas.com>
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>, linux-media@...r.kernel.org,
        linux-kernel@...r.kernel.org, Biju Das <biju.das.au@...il.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH 2/2] media: tvp541x: Drop CONFIG_OF ifdeffery

Hi Biju

On Sun, Sep 10, 2023 at 06:40:51PM +0100, Biju Das wrote:
> 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 <biju.das.jz@...renesas.com>
> ---
>  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 <linux/slab.h>
>  #include <linux/delay.h>
>  #include <linux/videodev2.h>
> +#include <linux/mod_devicetable.h>

Might be a good occasion for alphabetically sorting the inclusions..

>  #include <linux/module.h>
>  #include <linux/v4l2-mediabus.h>
>  #include <linux/of.h>
> @@ -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,

Reviewed-by: Jacopo Mondi <jacopo.mondi+renesas@...asonboard.com>

Thanks
  j

>  		.name = TVP514X_MODULE_NAME,
>  	},
>  	.probe = tvp514x_probe,
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ