diff options
Diffstat (limited to 'drivers/hwmon/twl4030-madc-hwmon.c')
-rw-r--r-- | drivers/hwmon/twl4030-madc-hwmon.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/hwmon/twl4030-madc-hwmon.c b/drivers/hwmon/twl4030-madc-hwmon.c index 0018c7dd0097..1a174f0a3cde 100644 --- a/drivers/hwmon/twl4030-madc-hwmon.c +++ b/drivers/hwmon/twl4030-madc-hwmon.c | |||
@@ -44,12 +44,13 @@ static ssize_t madc_read(struct device *dev, | |||
44 | struct device_attribute *devattr, char *buf) | 44 | struct device_attribute *devattr, char *buf) |
45 | { | 45 | { |
46 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); | 46 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); |
47 | struct twl4030_madc_request req; | 47 | struct twl4030_madc_request req = { |
48 | .channels = 1 << attr->index, | ||
49 | .method = TWL4030_MADC_SW2, | ||
50 | .type = TWL4030_MADC_WAIT, | ||
51 | }; | ||
48 | long val; | 52 | long val; |
49 | 53 | ||
50 | req.channels = (1 << attr->index); | ||
51 | req.method = TWL4030_MADC_SW2; | ||
52 | req.func_cb = NULL; | ||
53 | val = twl4030_madc_conversion(&req); | 54 | val = twl4030_madc_conversion(&req); |
54 | if (val < 0) | 55 | if (val < 0) |
55 | return val; | 56 | return val; |