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: <20120712095352.GD27520@pengutronix.de>
Date:	Thu, 12 Jul 2012 11:53:52 +0200
From:	Wolfram Sang <w.sang@...gutronix.de>
To:	Laxman Dewangan <ldewangan@...dia.com>
Cc:	khali@...ux-fr.org, ben-linux@...ff.org, swarren@...dia.com,
	linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-tegra@...r.kernel.org
Subject: Re: [PATCH 4/5] i2c: tegra: Use struct dev_pm_ops for power
 management

On Tue, Jul 10, 2012 at 04:50:43PM +0530, Laxman Dewangan wrote:
> Make the tegra i2c driver define its PM callbacks through
> struct dev_pm_ops objects rather than by using legacy PM hooks
> in struct platform_driver.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@...dia.com>
> ---
>  drivers/i2c/busses/i2c-tegra.c |   19 +++++++++++++------
>  1 files changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index 0792674..5f0572d 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -713,8 +713,9 @@ static int __devexit tegra_i2c_remove(struct platform_device *pdev)
>  }
>  
>  #ifdef CONFIG_PM
> -static int tegra_i2c_suspend(struct platform_device *pdev, pm_message_t state)
> +static int tegra_i2c_suspend(struct device *dev)
>  {
> +	struct platform_device *pdev = to_platform_device(dev);
>  	struct tegra_i2c_dev *i2c_dev = platform_get_drvdata(pdev);

I like Rafael's patch better because of dev_get_drvdata. I'll pick his
and add your 5/5 on top of that.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ