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]
Date:	Sun, 27 Dec 2015 14:40:19 +0200
From:	Andy Shevchenko <andy.shevchenko@...il.com>
To:	Geliang Tang <geliangtang@....com>
Cc:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
	Mika Westerberg <mika.westerberg@...ux.intel.com>,
	Wolfram Sang <wsa@...-dreams.de>, linux-i2c@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/9] i2c: designware: use to_pci_dev()

On Sun, Dec 27, 2015 at 12:45 PM, Geliang Tang <geliangtang@....com> wrote:
> Use to_pci_dev() instead of open-coding it.
>

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

> Signed-off-by: Geliang Tang <geliangtang@....com>
> ---
>  drivers/i2c/busses/i2c-designware-pcidrv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
> index 1543d35d..7368be0 100644
> --- a/drivers/i2c/busses/i2c-designware-pcidrv.c
> +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
> @@ -162,7 +162,7 @@ static struct dw_pci_controller dw_pci_controllers[] = {
>  #ifdef CONFIG_PM
>  static int i2c_dw_pci_suspend(struct device *dev)
>  {
> -       struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
> +       struct pci_dev *pdev = to_pci_dev(dev);
>
>         i2c_dw_disable(pci_get_drvdata(pdev));
>         return 0;
> @@ -170,7 +170,7 @@ static int i2c_dw_pci_suspend(struct device *dev)
>
>  static int i2c_dw_pci_resume(struct device *dev)
>  {
> -       struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
> +       struct pci_dev *pdev = to_pci_dev(dev);
>
>         return i2c_dw_init(pci_get_drvdata(pdev));
>  }
> --
> 2.5.0
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/



-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ