lkml.org 
[lkml]   [2019]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH next 16/25] mfd: Use dev_get_drvdata()
On Tue, 23 Apr 2019, Kefeng Wang wrote:

> Using dev_get_drvdata directly.
>
> Cc: Andy Gross <andy.gross@linaro.org>
> Cc: David Brown <david.brown@linaro.org>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: linux-arm-msm@vger.kernel.org
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> 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

\
 
 \ /
  Last update: 2019-05-08 12:33    [W:0.392 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site