From 8734e2bb4ba509648f234a1519dfa99a1baa942f Mon Sep 17 00:00:00 2001 From: Martin Mrvka Date: Tue, 26 Apr 2011 08:12:34 +0200 Subject: [PATCH] Fix for USB wakeup issue https://lkml.org/lkml/fancy/2011/4/20/440 --- .../linux-2.6.39-rc4-720_usb-wakeup.patch | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 packages/linux/patches/linux-2.6.39-rc4-720_usb-wakeup.patch diff --git a/packages/linux/patches/linux-2.6.39-rc4-720_usb-wakeup.patch b/packages/linux/patches/linux-2.6.39-rc4-720_usb-wakeup.patch new file mode 100644 index 0000000000..0303fd210b --- /dev/null +++ b/packages/linux/patches/linux-2.6.39-rc4-720_usb-wakeup.patch @@ -0,0 +1,31 @@ +=================================================================== +--- linux-2.6.orig/drivers/base/power/main.c ++++ linux-2.6/drivers/base/power/main.c +@@ -63,6 +63,7 @@ void device_pm_init(struct device *dev) + dev->power.wakeup = NULL; + spin_lock_init(&dev->power.lock); + pm_runtime_init(dev); ++ INIT_LIST_HEAD(&dev->power.entry); + } + + /** +Index: linux-2.6/drivers/base/power/wakeup.c +=================================================================== +--- linux-2.6.orig/drivers/base/power/wakeup.c ++++ linux-2.6/drivers/base/power/wakeup.c +@@ -258,7 +258,7 @@ void device_set_wakeup_capable(struct de + if (!!dev->power.can_wakeup == !!capable) + return; + +- if (device_is_registered(dev)) { ++ if (device_is_registered(dev) && !list_empty(&dev->power.entry)) { + if (capable) { + if (wakeup_sysfs_add(dev)) + return; +-- +To unsubscribe from this list: send the line "unsubscribe linux-kernel" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html +Please read the FAQ at http://www.tux.org/lkml/ + + \ No newline at end of file