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: <20190723153956.GN9224@smile.fi.intel.com>
Date:   Tue, 23 Jul 2019 18:39:56 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Bartosz Golaszewski <bgolaszewski@...libre.com>
Cc:     Chuhong Yuan <hslester96@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-gpio <linux-gpio@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: Use dev_get_drvdata

On Tue, Jul 23, 2019 at 10:34:28AM +0200, Bartosz Golaszewski wrote:
> wt., 23 lip 2019 o 10:29 Chuhong Yuan <hslester96@...il.com> napisaƂ(a):
> >
> > Instead of using to_pci_dev + pci_get_drvdata,
> > use dev_get_drvdata to make code simpler.
> >
> > Signed-off-by: Chuhong Yuan <hslester96@...il.com>
> > ---
> >  drivers/gpio/gpio-pch.c | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c
> > index 1d99293096f2..3f3d9a94b709 100644
> > --- a/drivers/gpio/gpio-pch.c
> > +++ b/drivers/gpio/gpio-pch.c
> > @@ -409,8 +409,7 @@ static int pch_gpio_probe(struct pci_dev *pdev,
> >
> >  static int __maybe_unused pch_gpio_suspend(struct device *dev)
> >  {
> > -       struct pci_dev *pdev = to_pci_dev(dev);
> > -       struct pch_gpio *chip = pci_get_drvdata(pdev);
> > +       struct pch_gpio *chip = dev_get_drvdata(dev);
> >         unsigned long flags;
> >
> >         spin_lock_irqsave(&chip->spinlock, flags);
> > @@ -422,8 +421,7 @@ static int __maybe_unused pch_gpio_suspend(struct device *dev)
> >
> >  static int __maybe_unused pch_gpio_resume(struct device *dev)
> >  {
> > -       struct pci_dev *pdev = to_pci_dev(dev);
> > -       struct pch_gpio *chip = pci_get_drvdata(pdev);
> > +       struct pch_gpio *chip = dev_get_drvdata(dev);
> >         unsigned long flags;
> >
> >         spin_lock_irqsave(&chip->spinlock, flags);
> > --
> > 2.20.1
> >
> 
> The subject line should start with gpio: pch: ...

I can change it when apply to gpio-intel tree.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ