* [PATCH] Driver core: don't initialize wakeup flags
@ 2010-03-08 21:46 Alan Stern
2010-03-08 22:00 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Alan Stern @ 2010-03-08 21:46 UTC (permalink / raw)
To: Greg KH; +Cc: Kernel development list, Linux-pm mailing list
This patch (as1351) removes an unnecessary and unwanted assignment
from device_initialize(). The wakeup flags are set to 0 along with
everything else when the device structure is allocated, so we don't
need to do it again. Furthermore, the subsystem might already have
set these flags to their correct values; we don't want to override it.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
---
Index: usb-2.6/drivers/base/core.c
===================================================================
--- usb-2.6.orig/drivers/base/core.c
+++ usb-2.6/drivers/base/core.c
@@ -561,7 +561,6 @@ void device_initialize(struct device *de
mutex_init(&dev->mutex);
spin_lock_init(&dev->devres_lock);
INIT_LIST_HEAD(&dev->devres_head);
- device_init_wakeup(dev, 0);
device_pm_init(dev);
set_dev_node(dev, -1);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Driver core: don't initialize wakeup flags
2010-03-08 21:46 [PATCH] Driver core: don't initialize wakeup flags Alan Stern
@ 2010-03-08 22:00 ` Greg KH
2010-03-08 22:17 ` Alan Stern
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2010-03-08 22:00 UTC (permalink / raw)
To: Alan Stern; +Cc: Kernel development list, Linux-pm mailing list
On Mon, Mar 08, 2010 at 04:46:19PM -0500, Alan Stern wrote:
> This patch (as1351) removes an unnecessary and unwanted assignment
> from device_initialize(). The wakeup flags are set to 0 along with
> everything else when the device structure is allocated, so we don't
> need to do it again. Furthermore, the subsystem might already have
> set these flags to their correct values; we don't want to override it.
Does this solve a bug where a subsystem does do this already? Or can it
wait for 2.6.35?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Driver core: don't initialize wakeup flags
2010-03-08 22:00 ` Greg KH
@ 2010-03-08 22:17 ` Alan Stern
0 siblings, 0 replies; 3+ messages in thread
From: Alan Stern @ 2010-03-08 22:17 UTC (permalink / raw)
To: Greg KH; +Cc: Kernel development list, Linux-pm mailing list
On Mon, 8 Mar 2010, Greg KH wrote:
> On Mon, Mar 08, 2010 at 04:46:19PM -0500, Alan Stern wrote:
> > This patch (as1351) removes an unnecessary and unwanted assignment
> > from device_initialize(). The wakeup flags are set to 0 along with
> > everything else when the device structure is allocated, so we don't
> > need to do it again. Furthermore, the subsystem might already have
> > set these flags to their correct values; we don't want to override it.
>
> Does this solve a bug where a subsystem does do this already? Or can it
> wait for 2.6.35?
It does not fix any existing bugs.
On the other hand, I have just submitted a separate patch adding
remote-wakeup support for PNP devices (i8042 keyboard ports in
particular) that depends on this one. If you consider not waking up
from suspend when keys are typed to be a bug, then the two patches
together (plus a third that enables remote wakeup for the keyboard
port by default) would count as a bug fix.
Or to put it differently, I'm waffling. :-)
Alan Stern
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-08 22:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-08 21:46 [PATCH] Driver core: don't initialize wakeup flags Alan Stern
2010-03-08 22:00 ` Greg KH
2010-03-08 22:17 ` Alan Stern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®