aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power/wakeup.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/power/wakeup.c')
-rw-r--r--drivers/base/power/wakeup.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index 5fb7718f256c..62e4de2aa8d1 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
@@ -334,10 +334,9 @@ void device_wakeup_arm_wake_irqs(void)
334 struct wakeup_source *ws; 334 struct wakeup_source *ws;
335 335
336 rcu_read_lock(); 336 rcu_read_lock();
337 list_for_each_entry_rcu(ws, &wakeup_sources, entry) { 337 list_for_each_entry_rcu(ws, &wakeup_sources, entry)
338 if (ws->wakeirq) 338 dev_pm_arm_wake_irq(ws->wakeirq);
339 dev_pm_arm_wake_irq(ws->wakeirq); 339
340 }
341 rcu_read_unlock(); 340 rcu_read_unlock();
342} 341}
343 342
@@ -351,10 +350,9 @@ void device_wakeup_disarm_wake_irqs(void)
351 struct wakeup_source *ws; 350 struct wakeup_source *ws;
352 351
353 rcu_read_lock(); 352 rcu_read_lock();
354 list_for_each_entry_rcu(ws, &wakeup_sources, entry) { 353 list_for_each_entry_rcu(ws, &wakeup_sources, entry)
355 if (ws->wakeirq) 354 dev_pm_disarm_wake_irq(ws->wakeirq);
356 dev_pm_disarm_wake_irq(ws->wakeirq); 355
357 }
358 rcu_read_unlock(); 356 rcu_read_unlock();
359} 357}
360 358
@@ -390,9 +388,7 @@ int device_wakeup_disable(struct device *dev)
390 return -EINVAL; 388 return -EINVAL;
391 389
392 ws = device_wakeup_detach(dev); 390 ws = device_wakeup_detach(dev);
393 if (ws) 391 wakeup_source_unregister(ws);
394 wakeup_source_unregister(ws);
395
396 return 0; 392 return 0;
397} 393}
398EXPORT_SYMBOL_GPL(device_wakeup_disable); 394EXPORT_SYMBOL_GPL(device_wakeup_disable);