aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/gpio-fan.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-03-18 12:02:41 +0800
committerAlex Shi <alex.shi@linaro.org>2016-03-18 12:02:41 +0800
commit5cc3b58828a8bb2ebb34de96d1aec1564f912a31 (patch)
tree2694db57173168b3a222c25c3372cdef0b17924f /drivers/hwmon/gpio-fan.c
parentc24745baffdb7143d6f345659fb6d781b070ca50 (diff)
parent7f30737678023b5becaf0e2e012665f71b886a7d (diff)
Merge tag 'v4.1.20' into linux-linaro-lsk-v4.1lsk-v4.1-16.03
This is the 4.1.20 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 a3dae6d0082a..83ea8c8039fa 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;
}