On Tue, 23 Apr 2019, Kefeng Wang wrote:

> Using dev_get_drvdata directly.
> 
> Cc: Andy Gross <andy.gr...@linaro.org>
> Cc: David Brown <david.br...@linaro.org>
> Cc: Lee Jones <lee.jo...@linaro.org>
> Cc: linux-arm-...@vger.kernel.org
> Signed-off-by: Kefeng Wang <wangkefeng.w...@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

Reply via email to