PCI: fix incorrect error return in pci_enable_wake
PATCH 1/1 PCI: fix incorrect error return in pci_enable_wake
In reply to a message not in the archiveThis patch (as1186) fixes a minor mistake in pci_enable_wake(). When the routine is asked to disable remote wakeup, it should not return an error merely because the device is not allowed to do wakeups!
---
drivers/pci/pci.c +1 -1
@@ -1107,7 +1107,7 @@ int pci_enable_wake(struct pci_dev *dev,int error =0 ;bool pme_done = false; -if (!device_may_wakeup (&dev->dev)) +if (enable && !device_may_wakeup (&dev->dev))return -EINVAL ;/*
Rafael J. Wysocki
Acked-byQuoted 5 lines · Alan Stern
This patch (as1186) fixes a minor mistake in
pci_enable_wake(). When the routine is asked to disable remote wakeup, it should not return an error merely because the device is not allowed to do wakeups!Signed-off-by Alan Stern <[email protected]>
[This should go to Jesse, BTW, already CCed.]
Quoted 15 lines
---
Index:
usb-2.6/drivers/pci/pci.c
===================================================================drivers/pci/pci.c +1
-1@@ -1107,7 +1107,7 @@ int pci_enable_wake(struct pci_dev *dev,int error =0 ;bool pme_done = false; -if (!device_may_wakeup (&dev->dev)) +if (enable && !device_may_wakeup (&dev->dev))return -EINVAL ;/*
Pavel Machek
Acked-byQuoted 5 lines · Alan Stern
This patch (as1186) fixes a minor mistake in
pci_enable_wake(). When the routine is asked to disable remote wakeup, it should not return an error merely because the device is not allowed to do wakeups!Signed-off-by Alan Stern <[email protected]>
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 8 lines · Rafael J. Wysocki
Quoted 5 lines · Alan Stern
This patch (as1186) fixes a minor mistake in
pci_enable_wake(). When the routine is asked to disable remote wakeup, it should not return an error merely because the device is not allowed to do wakeups!Signed-off-by Alan Stern <[email protected]>
I lost the original of this one. Alan can you resend to me with Rafael's ack?
Thanks,
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Alan Stern
Acked-by Rafael J. WysockiThis patch (as1186) fixes a minor mistake in pci_enable_wake(). When the routine is asked to disable remote wakeup, it should not return an error merely because the device is not allowed to do wakeups!
---
Quoted 1 line · Jesse Barnes
I lost the original of this one. Alan can you resend to me with Rafael's ack?
Here you go.
Alan Stern
drivers/pci/pci.c +1 -1
@@ -1107,7 +1107,7 @@ int pci_enable_wake(struct pci_dev *dev,int error =0 ;bool pme_done = false; -if (!device_may_wakeup (&dev->dev)) +if (enable && !device_may_wakeup (&dev->dev))return -EINVAL ;/*