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: <ZVYVu-fiM6dETizU@gofer.mess.org>
Date:   Thu, 16 Nov 2023 13:14:35 +0000
From:   Sean Young <sean@...s.org>
To:     Rob Herring <robh@...nel.org>
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH] media: ir-hix5hd2: Use device_get_match_data()

On Wed, Nov 15, 2023 at 03:01:13PM -0600, Rob Herring wrote:
> Use preferred device_get_match_data() instead of of_match_device() to
> get the driver match data. With this, adjust the includes to explicitly
> include the correct headers.

This is now applied. Sorry about the delay.

Thanks
Sean

> 
> Signed-off-by: Rob Herring <robh@...nel.org>
> ---
>  drivers/media/rc/ir-hix5hd2.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/media/rc/ir-hix5hd2.c b/drivers/media/rc/ir-hix5hd2.c
> index 0034f615b466..de5bb9a08ea4 100644
> --- a/drivers/media/rc/ir-hix5hd2.c
> +++ b/drivers/media/rc/ir-hix5hd2.c
> @@ -9,7 +9,9 @@
>  #include <linux/interrupt.h>
>  #include <linux/mfd/syscon.h>
>  #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> +#include <linux/platform_device.h>
> +#include <linux/property.h>
>  #include <linux/regmap.h>
>  #include <media/rc-core.h>
>  
> @@ -251,7 +253,6 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
>  	struct device *dev = &pdev->dev;
>  	struct hix5hd2_ir_priv *priv;
>  	struct device_node *node = pdev->dev.of_node;
> -	const struct of_device_id *of_id;
>  	const char *map_name;
>  	int ret;
>  
> @@ -259,12 +260,11 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
>  	if (!priv)
>  		return -ENOMEM;
>  
> -	of_id = of_match_device(hix5hd2_ir_table, dev);
> -	if (!of_id) {
> +	priv->socdata = device_get_match_data(dev);
> +	if (!priv->socdata) {
>  		dev_err(dev, "Unable to initialize IR data\n");
>  		return -ENODEV;
>  	}
> -	priv->socdata = of_id->data;
>  
>  	priv->regmap = syscon_regmap_lookup_by_phandle(node,
>  						       "hisilicon,power-syscon");
> -- 
> 2.42.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ