summaryrefslogtreecommitdiff
path: root/drivers/thermal/thermal_of.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal/thermal_of.c')
-rw-r--r--drivers/thermal/thermal_of.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c
index 8264d5c3bbb3..1a51a4d240ff 100644
--- a/drivers/thermal/thermal_of.c
+++ b/drivers/thermal/thermal_of.c
@@ -405,9 +405,12 @@ static struct thermal_zone_device *thermal_of_zone_register(struct device_node *
of_ops.should_bind = thermal_of_should_bind;
ret = of_property_read_string(np, "critical-action", &action);
- if (!ret)
- if (!of_ops.critical && !strcasecmp(action, "reboot"))
+ if (!ret && !of_ops.critical) {
+ if (!strcasecmp(action, "reboot"))
of_ops.critical = thermal_zone_device_critical_reboot;
+ else if (!strcasecmp(action, "shutdown"))
+ of_ops.critical = thermal_zone_device_critical_shutdown;
+ }
tz = thermal_zone_device_register_with_trips(np->name, trips, ntrips,
data, &of_ops, &tzp,