aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/reset/ltc2952-poweroff.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-05-12 18:49:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-05-12 18:49:29 -0400
commitcc49e8c9e66d4c52b121de0da666393c4140c0f2 (patch)
treebf213afb91e09dbba66a5b51c5312b423e675884 /drivers/power/reset/ltc2952-poweroff.c
parent4cfceaf0c087f47033f5e61a801f4136d6fb68c6 (diff)
parent8ebb7e9c1a502cfc300618c19c3c6f06fc76d237 (diff)
Merge tag 'for-v4.1-rc' of git://git.infradead.org/battery-2.6
Pull power supply and reset fixes from Sebastian Reichel: "misc fixes" * tag 'for-v4.1-rc' of git://git.infradead.org/battery-2.6: power: bq27x00_battery: Add missing MODULE_ALIAS power: reset: Add MFD_SYSCON depends for brcmstb power: reset: ltc2952: Remove bogus hrtimer_start() return value checks power_supply: fix oops in collie_battery driver power/reset: at91: fix return value check in at91_reset_platform_probe() MAINTAINERS: Add me as maintainer of Nokia N900 power supply drivers axp288_fuel_gauge: Add original author details
Diffstat (limited to 'drivers/power/reset/ltc2952-poweroff.c')
-rw-r--r--drivers/power/reset/ltc2952-poweroff.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/power/reset/ltc2952-poweroff.c b/drivers/power/reset/ltc2952-poweroff.c
index 7ef193b6f7fe..1e08195551fe 100644
--- a/drivers/power/reset/ltc2952-poweroff.c
+++ b/drivers/power/reset/ltc2952-poweroff.c
@@ -120,18 +120,7 @@ static enum hrtimer_restart ltc2952_poweroff_timer_wde(struct hrtimer *timer)
120 120
121static void ltc2952_poweroff_start_wde(struct ltc2952_poweroff *data) 121static void ltc2952_poweroff_start_wde(struct ltc2952_poweroff *data)
122{ 122{
123 if (hrtimer_start(&data->timer_wde, data->wde_interval, 123 hrtimer_start(&data->timer_wde, data->wde_interval, HRTIMER_MODE_REL);
124 HRTIMER_MODE_REL)) {
125 /*
126 * The device will not toggle the watchdog reset,
127 * thus shut down is only safe if the PowerPath controller
128 * has a long enough time-off before triggering a hardware
129 * power-off.
130 *
131 * Only sending a warning as the system will power-off anyway
132 */
133 dev_err(data->dev, "unable to start the timer\n");
134 }
135} 124}
136 125
137static enum hrtimer_restart 126static enum hrtimer_restart
@@ -165,9 +154,8 @@ static irqreturn_t ltc2952_poweroff_handler(int irq, void *dev_id)
165 } 154 }
166 155
167 if (gpiod_get_value(data->gpio_trigger)) { 156 if (gpiod_get_value(data->gpio_trigger)) {
168 if (hrtimer_start(&data->timer_trigger, data->trigger_delay, 157 hrtimer_start(&data->timer_trigger, data->trigger_delay,
169 HRTIMER_MODE_REL)) 158 HRTIMER_MODE_REL);
170 dev_err(data->dev, "unable to start the wait timer\n");
171 } else { 159 } else {
172 hrtimer_cancel(&data->timer_trigger); 160 hrtimer_cancel(&data->timer_trigger);
173 /* omitting return value check, timer should have been valid */ 161 /* omitting return value check, timer should have been valid */