[PATCH 09/10] i2c: designware-platdrv: Simplify code by using dev_get_drvdata()
Jarkko Nikula
jarkko.nikula at linux.intel.com
Wed Jun 15 04:24:52 PDT 2016
On 06/14/2016 06:07 PM, Ulf Hansson wrote:
> Signed-off-by: Ulf Hansson <ulf.hansson at linaro.org>
> ---
> drivers/i2c/busses/i2c-designware-platdrv.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
> index 2b91af3..b2c6037 100644
> --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> @@ -310,8 +310,7 @@ static void dw_i2c_plat_complete(struct device *dev)
> #ifdef CONFIG_PM
> static int dw_i2c_plat_suspend(struct device *dev)
> {
> - struct platform_device *pdev = to_platform_device(dev);
> - struct dw_i2c_dev *i_dev = platform_get_drvdata(pdev);
> + struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
>
Acked-by: Jarkko Nikula <jarkko.nikula at linux.intel.com>
More information about the linux-arm-kernel
mailing list