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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ya9SmcbJdHMnvg0y@smile.fi.intel.com>
Date:   Tue, 7 Dec 2021 14:24:57 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Bartosz Golaszewski <brgl@...ev.pl>
Cc:     Kent Gibson <warthog618@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Shuah Khan <shuah@...nel.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v13 3/7] gpiolib: of: make fwnode take precedence in
 struct gpio_chip

On Tue, Dec 07, 2021 at 10:34:08AM +0100, Bartosz Golaszewski wrote:
> If the driver sets the fwnode in struct gpio_chip, let it take
> precedence over the of_node. This only affects OF-based systems,
> ACPI needs to be converted separately.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Thanks!

> Signed-off-by: Bartosz Golaszewski <brgl@...ev.pl>
> ---
>  drivers/gpio/gpiolib-of.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
> index 0ad288ab6262..91dcf2c6cdd8 100644
> --- a/drivers/gpio/gpiolib-of.c
> +++ b/drivers/gpio/gpiolib-of.c
> @@ -1046,6 +1046,9 @@ void of_gpio_dev_init(struct gpio_chip *gc, struct gpio_device *gdev)
>  	if (gc->parent)
>  		gdev->dev.of_node = gc->parent->of_node;
>  
> +	if (gc->fwnode)
> +		gc->of_node = to_of_node(gc->fwnode);
> +
>  	/* If the gpiochip has an assigned OF node this takes precedence */
>  	if (gc->of_node)
>  		gdev->dev.of_node = gc->of_node;
> -- 
> 2.25.1
> 

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ