summaryrefslogtreecommitdiff
path: root/drivers/hwmon/gpio-fan.c
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-03-29 13:02:23 -0700
committerStefan Agner <stefan.agner@toradex.com>2016-03-29 13:02:23 -0700
commit1df133c0db64d633bbb9b238aa0e1588e2c5e7d6 (patch)
treec68d76907c523e81b5d0e8a924728f9e1aed1844 /drivers/hwmon/gpio-fan.c
parent2b7d39d1a28cb478627fc22fdc8dd77ed89ffe92 (diff)
parent62e21959dc6f25c5fce0c1a0934e4a9d982bf99b (diff)
Merge tag 'v4.4.5' into toradex_vf_4.4-next
This is the 4.4.5 stable release
Diffstat (limited to 'drivers/hwmon/gpio-fan.c')
-rw-r--r--drivers/hwmon/gpio-fan.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
index 82de3deeb18a..685568b1236d 100644
--- a/drivers/hwmon/gpio-fan.c
+++ b/drivers/hwmon/gpio-fan.c
@@ -406,16 +406,11 @@ static int gpio_fan_get_cur_state(struct thermal_cooling_device *cdev,
unsigned long *state)
{
struct gpio_fan_data *fan_data = cdev->devdata;
- int r;
if (!fan_data)
return -EINVAL;
- r = get_fan_speed_index(fan_data);
- if (r < 0)
- return r;
-
- *state = r;
+ *state = fan_data->speed_index;
return 0;
}