* [PATCH next 07/25] hwmon: s3c: Use dev_get_drvdata()
[not found] <20190423075020.173734-1-wangkefeng.wang@huawei.com>
@ 2019-04-23 7:50 ` Kefeng Wang
2019-04-23 13:43 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Kefeng Wang @ 2019-04-23 7:50 UTC (permalink / raw)
To: linux-kernel
Cc: Masahiro Yamada, Kefeng Wang, Jean Delvare, Guenter Roeck, linux-hwmon
Using dev_get_drvdata directly.
Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
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;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH next 07/25] hwmon: s3c: Use dev_get_drvdata()
2019-04-23 7:50 ` [PATCH next 07/25] hwmon: s3c: Use dev_get_drvdata() Kefeng Wang
@ 2019-04-23 13:43 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2019-04-23 13:43 UTC (permalink / raw)
To: Kefeng Wang; +Cc: linux-kernel, Masahiro Yamada, Jean Delvare, linux-hwmon
On Tue, Apr 23, 2019 at 03:50:02PM +0800, Kefeng Wang wrote:
> Using dev_get_drvdata directly.
>
> Cc: Jean Delvare <jdelvare@suse.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: linux-hwmon@vger.kernel.org
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-23 13:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20190423075020.173734-1-wangkefeng.wang@huawei.com>
2019-04-23 7:50 ` [PATCH next 07/25] hwmon: s3c: Use dev_get_drvdata() Kefeng Wang
2019-04-23 13:43 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).