summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/da9062-thermal.c
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@collabora.com>2020-06-29 14:29:19 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2020-06-29 20:26:35 +0200
commit1ee14820fd8ee79c4fc191155f48c985f28040e2 (patch)
tree8d42861cf3c807a4a103b918abd28723f90e1924 /drivers/thermal/da9062-thermal.c
parent5a3506657f71d7ca124c040aff98639673c5dc97 (diff)
downloadlinux-stable-1ee14820fd8ee79c4fc191155f48c985f28040e2.tar.gz
linux-stable-1ee14820fd8ee79c4fc191155f48c985f28040e2.tar.bz2
linux-stable-1ee14820fd8ee79c4fc191155f48c985f28040e2.zip
thermal: remove get_mode() operation of drivers
get_mode() is now redundant, as the state is stored in struct thermal_zone_device. Consequently the "mode" attribute in sysfs can always be visible, because it is always possible to get the mode from struct tzd. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> [for acerhdf] Acked-by: Peter Kaestle <peter@piie.net> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20200629122925.21729-6-andrzej.p@collabora.com
Diffstat (limited to 'drivers/thermal/da9062-thermal.c')
-rw-r--r--drivers/thermal/da9062-thermal.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/thermal/da9062-thermal.c b/drivers/thermal/da9062-thermal.c
index a14c7981c7c7..a7ac8afb063e 100644
--- a/drivers/thermal/da9062-thermal.c
+++ b/drivers/thermal/da9062-thermal.c
@@ -120,13 +120,6 @@ static irqreturn_t da9062_thermal_irq_handler(int irq, void *data)
return IRQ_HANDLED;
}
-static int da9062_thermal_get_mode(struct thermal_zone_device *z,
- enum thermal_device_mode *mode)
-{
- *mode = z->mode;
- return 0;
-}
-
static int da9062_thermal_get_trip_type(struct thermal_zone_device *z,
int trip,
enum thermal_trip_type *type)
@@ -179,7 +172,6 @@ static int da9062_thermal_get_temp(struct thermal_zone_device *z,
static struct thermal_zone_device_ops da9062_thermal_ops = {
.get_temp = da9062_thermal_get_temp,
- .get_mode = da9062_thermal_get_mode,
.get_trip_type = da9062_thermal_get_trip_type,
.get_trip_temp = da9062_thermal_get_trip_temp,
};