[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190423134326.GA19164@roeck-us.net>
Date: Tue, 23 Apr 2019 06:43:26 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Kefeng Wang <wangkefeng.wang@...wei.com>
Cc: linux-kernel@...r.kernel.org,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Jean Delvare <jdelvare@...e.com>, linux-hwmon@...r.kernel.org
Subject: Re: [PATCH next 07/25] hwmon: s3c: Use dev_get_drvdata()
On Tue, Apr 23, 2019 at 03:50:02PM +0800, Kefeng Wang wrote:
> Using dev_get_drvdata directly.
>
> Cc: Jean Delvare <jdelvare@...e.com>
> Cc: Guenter Roeck <linux@...ck-us.net>
> Cc: linux-hwmon@...r.kernel.org
> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
Applied to hwmon-next.
Thanks,
Guenter
> ---
> drivers/hwmon/s3c-hwmon.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c
> index 0c4710d35d16..0d65aa5985e2 100644
> --- a/drivers/hwmon/s3c-hwmon.c
> +++ b/drivers/hwmon/s3c-hwmon.c
> @@ -98,7 +98,7 @@ static int s3c_hwmon_read_ch(struct device *dev,
> static ssize_t s3c_hwmon_show_raw(struct device *dev,
> struct device_attribute *attr, char *buf)
> {
> - struct s3c_hwmon *adc = platform_get_drvdata(to_platform_device(dev));
> + struct s3c_hwmon *adc = dev_get_drvdata(dev);
> struct sensor_device_attribute *sa = to_sensor_dev_attr(attr);
> int ret;
>
> @@ -164,7 +164,7 @@ static ssize_t s3c_hwmon_ch_show(struct device *dev,
> char *buf)
> {
> struct sensor_device_attribute *sen_attr = to_sensor_dev_attr(attr);
> - struct s3c_hwmon *hwmon = platform_get_drvdata(to_platform_device(dev));
> + struct s3c_hwmon *hwmon = dev_get_drvdata(dev);
> struct s3c_hwmon_pdata *pdata = dev_get_platdata(dev);
> struct s3c_hwmon_chcfg *cfg;
> int ret;
Powered by blists - more mailing lists