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]
Date:   Thu, 10 Nov 2022 14:33:06 -0800
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     Ulf Hansson <ulf.hansson@...aro.org>,
        Balamanikandan Gunasundar 
        <balamanikandan.gunasundar@...rochip.com>,
        ludovic.desroches@...rochip.com, nicolas.ferre@...rochip.com,
        alexandre.belloni@...tlin.com, 3chas3@...il.com,
        linux-mmc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org,
        linux-atm-general@...ts.sourceforge.net, netdev@...r.kernel.org
Subject: Re: [PATCH] mmc: atmel-mci: Convert to gpio descriptors

Hi,

On Wed, Nov 09, 2022 at 03:48:32PM +0100, Linus Walleij wrote:
> On Wed, Nov 9, 2022 at 1:39 PM Ulf Hansson <ulf.hansson@...aro.org> wrote:
> > On Wed, 9 Nov 2022 at 05:39, Balamanikandan Gunasundar
> (...)
> > > --- a/drivers/mmc/host/atmel-mci.c
> > > +++ b/drivers/mmc/host/atmel-mci.c
> > > @@ -19,7 +19,8 @@
> > >  #include <linux/module.h>
> > >  #include <linux/of.h>
> > >  #include <linux/of_device.h>
> > > -#include <linux/of_gpio.h>
> > > +#include <linux/irq.h>
> > > +#include <linux/gpio/consumer.h>
> 
> This is nice, but higher up the driver also #include <linux/gpio.h>
> so delete that line too, <linux/gpio/consumer.h> should be enough.
> 
> > > -                       of_get_named_gpio(cnp, "cd-gpios", 0);
> > > +                       devm_gpiod_get_from_of_node(&pdev->dev, cnp,
> > > +                                                   "cd-gpios",
> > > +                                                   0, GPIOD_IN, "cd-gpios");
> (...)
> > >                 pdata->slot[slot_id].wp_pin =
> > > -                       of_get_named_gpio(cnp, "wp-gpios", 0);
> > > +                       devm_gpiod_get_from_of_node(&pdev->dev, cnp,
> > > +                                                   "wp-gpios",
> > > +                                                   0, GPIOD_IN, "wp-gpios");
> 
> Hm. Dmitry is trying to get rid of of_get_named_gpio() I think.
> 
> But I suppose we can migrate to fwnode later.

I'd much rather we changed this right away to

	devm_fwnode_gpiod_get(&pdev->dev, of_fwnode_handle(cnp),
			      "wp", GPIOD_IN, "wp-gpios");

and not added new users of devm_gpiod_get_from_of_node() which is there
only 2 left.

Thanks!

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ