Re: [PATCH next 16/25] mfd: Use dev_get_drvdata()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 23 Apr 2019, Kefeng Wang wrote:

> Using dev_get_drvdata directly.
> 
> Cc: Andy Gross <andy.gross@xxxxxxxxxx>
> Cc: David Brown <david.brown@xxxxxxxxxx>
> Cc: Lee Jones <lee.jones@xxxxxxxxxx>
> Cc: linux-arm-msm@xxxxxxxxxxxxxxx
> Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
> ---
>  drivers/mfd/ssbi.c     |  2 +-
>  drivers/mfd/t7l66xb.c  | 12 ++++--------
>  drivers/mfd/tc6387xb.c | 12 ++++--------
>  drivers/mfd/tc6393xb.c | 21 +++++++--------------
>  4 files changed, 16 insertions(+), 31 deletions(-)
> 
> diff --git a/drivers/mfd/ssbi.c b/drivers/mfd/ssbi.c
> index 36b96fee4ce6..50f87d0f9151 100644
> --- a/drivers/mfd/ssbi.c
> +++ b/drivers/mfd/ssbi.c
> @@ -80,7 +80,7 @@ struct ssbi {
>  	int (*write)(struct ssbi *, u16 addr, const u8 *buf, int len);
>  };
>  
> -#define to_ssbi(dev)	platform_get_drvdata(to_platform_device(dev))
> +#define to_ssbi(dev)	dev_get_drvdata(dev)

If you could replace 'to_ssbi(dev)' with 'dev_get_drvdata(dev)' it
would be better.

The rest of the changes look fine.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux