aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/w83627ehf.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-07-30 04:13:06 -0400
committerGuenter Roeck <linux@roeck-us.net>2013-08-12 01:10:39 -0400
commita8b3a3a53f9a814e9938ea9cc179086ff5c0a387 (patch)
tree6905bf9311520248db9cdd63b8d7e1a1840b10b8 /drivers/hwmon/w83627ehf.c
parentf58876ac8c73f91c28f7825dee37ad64092eccf7 (diff)
hwmon: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/w83627ehf.c')
-rw-r--r--drivers/hwmon/w83627ehf.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index 004801e6fbb9..286ca7bae97c 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -673,7 +673,7 @@ static void w83627ehf_write_fan_div(struct w83627ehf_data *data, int nr)
673static void w83627ehf_write_fan_div_common(struct device *dev, 673static void w83627ehf_write_fan_div_common(struct device *dev,
674 struct w83627ehf_data *data, int nr) 674 struct w83627ehf_data *data, int nr)
675{ 675{
676 struct w83627ehf_sio_data *sio_data = dev->platform_data; 676 struct w83627ehf_sio_data *sio_data = dev_get_platdata(dev);
677 677
678 if (sio_data->kind == nct6776) 678 if (sio_data->kind == nct6776)
679 ; /* no dividers, do nothing */ 679 ; /* no dividers, do nothing */
@@ -724,7 +724,7 @@ static void w83627ehf_update_fan_div(struct w83627ehf_data *data)
724static void w83627ehf_update_fan_div_common(struct device *dev, 724static void w83627ehf_update_fan_div_common(struct device *dev,
725 struct w83627ehf_data *data) 725 struct w83627ehf_data *data)
726{ 726{
727 struct w83627ehf_sio_data *sio_data = dev->platform_data; 727 struct w83627ehf_sio_data *sio_data = dev_get_platdata(dev);
728 728
729 if (sio_data->kind == nct6776) 729 if (sio_data->kind == nct6776)
730 ; /* no dividers, do nothing */ 730 ; /* no dividers, do nothing */
@@ -781,7 +781,7 @@ static void w83627ehf_update_pwm(struct w83627ehf_data *data)
781static void w83627ehf_update_pwm_common(struct device *dev, 781static void w83627ehf_update_pwm_common(struct device *dev,
782 struct w83627ehf_data *data) 782 struct w83627ehf_data *data)
783{ 783{
784 struct w83627ehf_sio_data *sio_data = dev->platform_data; 784 struct w83627ehf_sio_data *sio_data = dev_get_platdata(dev);
785 785
786 if (sio_data->kind == nct6775 || sio_data->kind == nct6776) 786 if (sio_data->kind == nct6775 || sio_data->kind == nct6776)
787 nct6775_update_pwm(data); 787 nct6775_update_pwm(data);
@@ -792,7 +792,7 @@ static void w83627ehf_update_pwm_common(struct device *dev,
792static struct w83627ehf_data *w83627ehf_update_device(struct device *dev) 792static struct w83627ehf_data *w83627ehf_update_device(struct device *dev)
793{ 793{
794 struct w83627ehf_data *data = dev_get_drvdata(dev); 794 struct w83627ehf_data *data = dev_get_drvdata(dev);
795 struct w83627ehf_sio_data *sio_data = dev->platform_data; 795 struct w83627ehf_sio_data *sio_data = dev_get_platdata(dev);
796 796
797 int i; 797 int i;
798 798
@@ -1392,7 +1392,7 @@ store_pwm_mode(struct device *dev, struct device_attribute *attr,
1392{ 1392{
1393 struct w83627ehf_data *data = dev_get_drvdata(dev); 1393 struct w83627ehf_data *data = dev_get_drvdata(dev);
1394 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); 1394 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr);
1395 struct w83627ehf_sio_data *sio_data = dev->platform_data; 1395 struct w83627ehf_sio_data *sio_data = dev_get_platdata(dev);
1396 int nr = sensor_attr->index; 1396 int nr = sensor_attr->index;
1397 unsigned long val; 1397 unsigned long val;
1398 int err; 1398 int err;
@@ -1448,7 +1448,7 @@ store_pwm_enable(struct device *dev, struct device_attribute *attr,
1448 const char *buf, size_t count) 1448 const char *buf, size_t count)
1449{ 1449{
1450 struct w83627ehf_data *data = dev_get_drvdata(dev); 1450 struct w83627ehf_data *data = dev_get_drvdata(dev);
1451 struct w83627ehf_sio_data *sio_data = dev->platform_data; 1451 struct w83627ehf_sio_data *sio_data = dev_get_platdata(dev);
1452 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); 1452 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr);
1453 int nr = sensor_attr->index; 1453 int nr = sensor_attr->index;
1454 unsigned long val; 1454 unsigned long val;
@@ -1527,7 +1527,7 @@ store_tolerance(struct device *dev, struct device_attribute *attr,
1527 const char *buf, size_t count) 1527 const char *buf, size_t count)
1528{ 1528{
1529 struct w83627ehf_data *data = dev_get_drvdata(dev); 1529 struct w83627ehf_data *data = dev_get_drvdata(dev);
1530 struct w83627ehf_sio_data *sio_data = dev->platform_data; 1530 struct w83627ehf_sio_data *sio_data = dev_get_platdata(dev);
1531 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); 1531 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr);
1532 int nr = sensor_attr->index; 1532 int nr = sensor_attr->index;
1533 u16 reg; 1533 u16 reg;
@@ -2065,7 +2065,7 @@ w83627ehf_check_fan_inputs(const struct w83627ehf_sio_data *sio_data,
2065static int w83627ehf_probe(struct platform_device *pdev) 2065static int w83627ehf_probe(struct platform_device *pdev)
2066{ 2066{
2067 struct device *dev = &pdev->dev; 2067 struct device *dev = &pdev->dev;
2068 struct w83627ehf_sio_data *sio_data = dev->platform_data; 2068 struct w83627ehf_sio_data *sio_data = dev_get_platdata(dev);
2069 struct w83627ehf_data *data; 2069 struct w83627ehf_data *data;
2070 struct resource *res; 2070 struct resource *res;
2071 u8 en_vrm10; 2071 u8 en_vrm10;
@@ -2618,7 +2618,7 @@ static int w83627ehf_remove(struct platform_device *pdev)
2618static int w83627ehf_suspend(struct device *dev) 2618static int w83627ehf_suspend(struct device *dev)
2619{ 2619{
2620 struct w83627ehf_data *data = w83627ehf_update_device(dev); 2620 struct w83627ehf_data *data = w83627ehf_update_device(dev);
2621 struct w83627ehf_sio_data *sio_data = dev->platform_data; 2621 struct w83627ehf_sio_data *sio_data = dev_get_platdata(dev);
2622 2622
2623 mutex_lock(&data->update_lock); 2623 mutex_lock(&data->update_lock);
2624 data->vbat = w83627ehf_read_value(data, W83627EHF_REG_VBAT); 2624 data->vbat = w83627ehf_read_value(data, W83627EHF_REG_VBAT);
@@ -2634,7 +2634,7 @@ static int w83627ehf_suspend(struct device *dev)
2634static int w83627ehf_resume(struct device *dev) 2634static int w83627ehf_resume(struct device *dev)
2635{ 2635{
2636 struct w83627ehf_data *data = dev_get_drvdata(dev); 2636 struct w83627ehf_data *data = dev_get_drvdata(dev);
2637 struct w83627ehf_sio_data *sio_data = dev->platform_data; 2637 struct w83627ehf_sio_data *sio_data = dev_get_platdata(dev);
2638 int i; 2638 int i;
2639 2639
2640 mutex_lock(&data->update_lock); 2640 mutex_lock(&data->update_lock);