mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Merge branch 'pm-runtime' into pm-for-linus
* pm-runtime: PM / Tracing: build rpm-traces.c only if CONFIG_PM_RUNTIME is set PM / Runtime: Replace dev_dbg() with trace_rpm_*() PM / Runtime: Introduce trace points for tracing rpm_* functions PM / Runtime: Don't run callbacks under lock for power.irq_safe set USB: Add wakeup info to debugging messages PM / Runtime: pm_runtime_idle() can be called in atomic context PM / Runtime: Add macro to test for runtime PM events PM / Runtime: Add might_sleep() to runtime PM functions
This commit is contained in:
commit
d727b60659
20 changed files with 226 additions and 66 deletions
|
|
@ -2409,7 +2409,7 @@ static int picolcd_raw_event(struct hid_device *hdev,
|
|||
#ifdef CONFIG_PM
|
||||
static int picolcd_suspend(struct hid_device *hdev, pm_message_t message)
|
||||
{
|
||||
if (message.event & PM_EVENT_AUTO)
|
||||
if (PMSG_IS_AUTO(message))
|
||||
return 0;
|
||||
|
||||
picolcd_suspend_backlight(hid_get_drvdata(hdev));
|
||||
|
|
|
|||
|
|
@ -1332,7 +1332,7 @@ static int hid_suspend(struct usb_interface *intf, pm_message_t message)
|
|||
struct usbhid_device *usbhid = hid->driver_data;
|
||||
int status;
|
||||
|
||||
if (message.event & PM_EVENT_AUTO) {
|
||||
if (PMSG_IS_AUTO(message)) {
|
||||
spin_lock_irq(&usbhid->lock); /* Sync with error handler */
|
||||
if (!test_bit(HID_RESET_PENDING, &usbhid->iofl)
|
||||
&& !test_bit(HID_CLEAR_HALT, &usbhid->iofl)
|
||||
|
|
@ -1367,7 +1367,7 @@ static int hid_suspend(struct usb_interface *intf, pm_message_t message)
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
if (!ignoreled && (message.event & PM_EVENT_AUTO)) {
|
||||
if (!ignoreled && PMSG_IS_AUTO(message)) {
|
||||
spin_lock_irq(&usbhid->lock);
|
||||
if (test_bit(HID_LED_ON, &usbhid->iofl)) {
|
||||
spin_unlock_irq(&usbhid->lock);
|
||||
|
|
@ -1380,8 +1380,7 @@ static int hid_suspend(struct usb_interface *intf, pm_message_t message)
|
|||
hid_cancel_delayed_stuff(usbhid);
|
||||
hid_cease_io(usbhid);
|
||||
|
||||
if ((message.event & PM_EVENT_AUTO) &&
|
||||
test_bit(HID_KEYS_PRESSED, &usbhid->iofl)) {
|
||||
if (PMSG_IS_AUTO(message) && test_bit(HID_KEYS_PRESSED, &usbhid->iofl)) {
|
||||
/* lost race against keypresses */
|
||||
status = hid_start_in(hid);
|
||||
if (status < 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue