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] [thread-next>] [day] [month] [year] [list]
Message-ID: <d45948de-a51b-73a5-27e1-924053105c9f@microchip.com>
Date:   Tue, 14 Feb 2023 11:05:52 +0000
From:   <Claudiu.Beznea@...rochip.com>
To:     <andriy.shevchenko@...ux.intel.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-gpio@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:     <Ludovic.Desroches@...rochip.com>, <linus.walleij@...aro.org>,
        <Nicolas.Ferre@...rochip.com>, <alexandre.belloni@...tlin.com>
Subject: Re: [PATCH v2 3/5] pinctrl: at91: Use of_device_get_match_data()

On 13.02.2023 17:45, Andy Shevchenko wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Use of_device_get_match_data() to simplify the code.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Reviewed-by: Claudiu Beznea <claudiu.beznea@...rochip.com>
Tested-by: Claudiu Beznea <claudiu.beznea@...rochip.com>

> ---
>  drivers/pinctrl/pinctrl-at91.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
> index 6d9015ed8a3b..055a88b2dacc 100644
> --- a/drivers/pinctrl/pinctrl-at91.c
> +++ b/drivers/pinctrl/pinctrl-at91.c
> @@ -1304,8 +1304,7 @@ static int at91_pinctrl_probe_dt(struct platform_device *pdev,
>                 return -ENODEV;
> 
>         info->dev = &pdev->dev;
> -       info->ops = (const struct at91_pinctrl_mux_ops *)
> -               of_match_device(at91_pinctrl_of_match, &pdev->dev)->data;
> +       info->ops = of_device_get_match_data(dev);
>         at91_pinctrl_child_count(info, np);
> 
>         /*
> @@ -1844,8 +1843,7 @@ static int at91_gpio_probe(struct platform_device *pdev)
>                 goto err;
>         }
> 
> -       at91_chip->ops = (const struct at91_pinctrl_mux_ops *)
> -               of_match_device(at91_gpio_of_match, &pdev->dev)->data;
> +       at91_chip->ops = of_device_get_match_data(dev);
>         at91_chip->pioc_virq = irq;
>         at91_chip->pioc_idx = alias_idx;
> 
> --
> 2.39.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ