Skip to content

Commit

Permalink
hwmon: (s3c) Use dev_get_drvdata()
Browse files Browse the repository at this point in the history
Using dev_get_drvdata directly.

Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Kefeng Wang authored and Guenter Roeck committed Apr 23, 2019
1 parent 212244f commit a601700
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hwmon/s3c-hwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a601700

Please sign in to comment.