* power_state: remove it from usb
@ 2008-02-21 13:01 Pavel Machek
2008-02-21 21:43 ` patch power_state-remove-it-from-usb.patch added to gregkh-2.6 tree gregkh
2008-02-21 21:50 ` power_state: remove it from usb Alan Stern
0 siblings, 2 replies; 8+ messages in thread
From: Pavel Machek @ 2008-02-21 13:01 UTC (permalink / raw)
To: kernel list, Linux-pm mailing list, Greg KH, stern, linux-usb
power_state is scheduled for removal, and it is used only write-only
by USB. Remove it.
Signed-off-by: Pavel Machek <pavel@suse.cz>
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 801b6f1..eeb8115 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -794,8 +794,6 @@ static int usb_suspend_device(struct usb
done:
dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status);
- if (status == 0)
- udev->dev.power.power_state.event = msg.event;
return status;
}
@@ -826,7 +824,6 @@ static int usb_resume_device(struct usb_
dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status);
if (status == 0) {
udev->autoresume_disabled = 0;
- udev->dev.power.power_state.event = PM_EVENT_ON;
}
return status;
}
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index 84760dd..739407b 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -73,7 +73,6 @@ int usb_hcd_pci_probe(struct pci_dev *de
if (pci_enable_device(dev) < 0)
return -ENODEV;
dev->current_state = PCI_D0;
- dev->dev.power.power_state = PMSG_ON;
if (!dev->irq) {
dev_err(&dev->dev,
@@ -302,8 +301,6 @@ int usb_hcd_pci_suspend(struct pci_dev *
done:
if (retval == 0) {
- dev->dev.power.power_state = PMSG_SUSPEND;
-
#ifdef CONFIG_PPC_PMAC
/* Disable ASIC clocks for USB */
if (machine_is(powermac)) {
@@ -406,8 +403,6 @@ #endif
pci_set_master(dev);
pci_restore_state(dev);
- dev->dev.power.power_state = PMSG_ON;
-
clear_bit(HCD_FLAG_SAW_IRQ, &hcd->flags);
if (hcd->driver->resume) {
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h
index 2375194..1bf8ccb 100644
--- a/drivers/usb/core/usb.h
+++ b/drivers/usb/core/usb.h
@@ -114,13 +114,11 @@ static inline int is_usb_device_driver(s
static inline void mark_active(struct usb_interface *f)
{
f->is_active = 1;
- f->dev.power.power_state.event = PM_EVENT_ON;
}
static inline void mark_quiesced(struct usb_interface *f)
{
f->is_active = 0;
- f->dev.power.power_state.event = PM_EVENT_SUSPEND;
}
static inline int is_active(const struct usb_interface *f)
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply related [flat|nested] 8+ messages in thread
* patch power_state-remove-it-from-usb.patch added to gregkh-2.6 tree
2008-02-21 13:01 power_state: remove it from usb Pavel Machek
@ 2008-02-21 21:43 ` gregkh
2008-02-21 22:18 ` [linux-pm] " Alan Stern
2008-02-21 21:50 ` power_state: remove it from usb Alan Stern
1 sibling, 1 reply; 8+ messages in thread
From: gregkh @ 2008-02-21 21:43 UTC (permalink / raw)
To: pavel, greg, gregkh, linux-kernel, linux-pm, pavel
This is a note to let you know that I've just added the patch titled
Subject: power_state: remove it from usb
to my gregkh-2.6 tree. Its filename is
power_state-remove-it-from-usb.patch
This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>From pavel@ucw.cz Thu Feb 21 13:36:03 2008
From: Pavel Machek <pavel@ucw.cz>
Date: Thu, 21 Feb 2008 14:01:45 +0100
Subject: power_state: remove it from usb
To: kernel list <linux-kernel@vger.kernel.org>, Linux-pm mailing list <linux-pm@lists.osdl.org>, Greg KH <greg@kroah.com>, stern@rowland.harvard.edu, linux-usb@vger.kernel.org
Message-ID: <20080221130145.GA3789@elf.ucw.cz>
Content-Disposition: inline
power_state is scheduled for removal, and it is used only write-only
by USB. Remove it.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/core/driver.c | 3 ---
drivers/usb/core/hcd-pci.c | 5 -----
drivers/usb/core/usb.h | 2 --
3 files changed, 10 deletions(-)
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -794,8 +794,6 @@ static int usb_suspend_device(struct usb
done:
dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status);
- if (status == 0)
- udev->dev.power.power_state.event = msg.event;
return status;
}
@@ -826,7 +824,6 @@ static int usb_resume_device(struct usb_
dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status);
if (status == 0) {
udev->autoresume_disabled = 0;
- udev->dev.power.power_state.event = PM_EVENT_ON;
}
return status;
}
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -73,7 +73,6 @@ int usb_hcd_pci_probe(struct pci_dev *de
if (pci_enable_device(dev) < 0)
return -ENODEV;
dev->current_state = PCI_D0;
- dev->dev.power.power_state = PMSG_ON;
if (!dev->irq) {
dev_err(&dev->dev,
@@ -302,8 +301,6 @@ int usb_hcd_pci_suspend(struct pci_dev *
done:
if (retval == 0) {
- dev->dev.power.power_state = PMSG_SUSPEND;
-
#ifdef CONFIG_PPC_PMAC
/* Disable ASIC clocks for USB */
if (machine_is(powermac)) {
@@ -406,8 +403,6 @@ int usb_hcd_pci_resume(struct pci_dev *d
pci_set_master(dev);
pci_restore_state(dev);
- dev->dev.power.power_state = PMSG_ON;
-
clear_bit(HCD_FLAG_SAW_IRQ, &hcd->flags);
if (hcd->driver->resume) {
--- a/drivers/usb/core/usb.h
+++ b/drivers/usb/core/usb.h
@@ -114,13 +114,11 @@ static inline int is_usb_device_driver(s
static inline void mark_active(struct usb_interface *f)
{
f->is_active = 1;
- f->dev.power.power_state.event = PM_EVENT_ON;
}
static inline void mark_quiesced(struct usb_interface *f)
{
f->is_active = 0;
- f->dev.power.power_state.event = PM_EVENT_SUSPEND;
}
static inline int is_active(const struct usb_interface *f)
Patches currently in gregkh-2.6 which might be from pavel@ucw.cz are
driver/driver-core-pm-make-suspend_device-static.patch
driver/pm-remove-unbalanced-mutex_unlock-from-dpm_resume.patch
driver/power_state-remove-it-from-driver-core.patch
usb/power_state-remove-it-from-usb.patch
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: power_state: remove it from usb
2008-02-21 13:01 power_state: remove it from usb Pavel Machek
2008-02-21 21:43 ` patch power_state-remove-it-from-usb.patch added to gregkh-2.6 tree gregkh
@ 2008-02-21 21:50 ` Alan Stern
2008-02-21 22:19 ` Pavel Machek
1 sibling, 1 reply; 8+ messages in thread
From: Alan Stern @ 2008-02-21 21:50 UTC (permalink / raw)
To: Pavel Machek; +Cc: kernel list, Linux-pm mailing list, Greg KH, linux-usb
On Thu, 21 Feb 2008, Pavel Machek wrote:
> power_state is scheduled for removal, and it is used only write-only
> by USB. Remove it.
Unfortunately some of the things you changed turn out not to be
write-only. (You also missed a usage of power.power_state in a
comment!) I'll post a more complete patch soon.
Alan Stern
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-pm] patch power_state-remove-it-from-usb.patch added to gregkh-2.6 tree
2008-02-21 21:43 ` patch power_state-remove-it-from-usb.patch added to gregkh-2.6 tree gregkh
@ 2008-02-21 22:18 ` Alan Stern
2008-02-21 22:22 ` Pavel Machek
0 siblings, 1 reply; 8+ messages in thread
From: Alan Stern @ 2008-02-21 22:18 UTC (permalink / raw)
To: gregkh; +Cc: pavel, greg, linux-kernel, linux-pm, pavel
On Thu, 21 Feb 2008 gregkh@suse.de wrote:
> This is a note to let you know that I've just added the patch titled
>
> Subject: power_state: remove it from usb
>
> to my gregkh-2.6 tree. Its filename is
>
> power_state-remove-it-from-usb.patch
>
> This tree can be found at
> http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>
>
> From pavel@ucw.cz Thu Feb 21 13:36:03 2008
> From: Pavel Machek <pavel@ucw.cz>
> Date: Thu, 21 Feb 2008 14:01:45 +0100
> Subject: power_state: remove it from usb
> To: kernel list <linux-kernel@vger.kernel.org>, Linux-pm mailing list <linux-pm@lists.osdl.org>, Greg KH <greg@kroah.com>, stern@rowland.harvard.edu, linux-usb@vger.kernel.org
> Message-ID: <20080221130145.GA3789@elf.ucw.cz>
> Content-Disposition: inline
>
>
>
> power_state is scheduled for removal, and it is used only write-only
> by USB. Remove it.
Greg, this patch is incomplete. Some of the settings that Pavel
removed are used by the host controller drivers. Please revert this;
I'll send a more complete patch later.
Alan Stern
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: power_state: remove it from usb
2008-02-21 21:50 ` power_state: remove it from usb Alan Stern
@ 2008-02-21 22:19 ` Pavel Machek
2008-02-21 22:37 ` Alan Stern
0 siblings, 1 reply; 8+ messages in thread
From: Pavel Machek @ 2008-02-21 22:19 UTC (permalink / raw)
To: Alan Stern; +Cc: kernel list, Linux-pm mailing list, Greg KH, linux-usb
On Thu 2008-02-21 16:50:36, Alan Stern wrote:
> On Thu, 21 Feb 2008, Pavel Machek wrote:
>
> > power_state is scheduled for removal, and it is used only write-only
> > by USB. Remove it.
>
> Unfortunately some of the things you changed turn out not to be
> write-only. (You also missed a usage of power.power_state in a
> comment!)
I might have missed comments, but where I missed read? It compiled
after I removed the field from the core...?
> I'll post a more complete patch soon.
Thanks!
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-pm] patch power_state-remove-it-from-usb.patch added to gregkh-2.6 tree
2008-02-21 22:18 ` [linux-pm] " Alan Stern
@ 2008-02-21 22:22 ` Pavel Machek
2008-02-21 22:33 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: Pavel Machek @ 2008-02-21 22:22 UTC (permalink / raw)
To: Alan Stern; +Cc: gregkh, greg, linux-kernel, linux-pm
On Thu 2008-02-21 17:18:32, Alan Stern wrote:
> On Thu, 21 Feb 2008 gregkh@suse.de wrote:
>
> > This is a note to let you know that I've just added the patch titled
> >
> > Subject: power_state: remove it from usb
> >
> > to my gregkh-2.6 tree. Its filename is
> >
> > power_state-remove-it-from-usb.patch
> >
> > This tree can be found at
> > http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
> >
> >
> > From pavel@ucw.cz Thu Feb 21 13:36:03 2008
> > From: Pavel Machek <pavel@ucw.cz>
> > Date: Thu, 21 Feb 2008 14:01:45 +0100
> > Subject: power_state: remove it from usb
> > To: kernel list <linux-kernel@vger.kernel.org>, Linux-pm mailing list <linux-pm@lists.osdl.org>, Greg KH <greg@kroah.com>, stern@rowland.harvard.edu, linux-usb@vger.kernel.org
> > Message-ID: <20080221130145.GA3789@elf.ucw.cz>
> > Content-Disposition: inline
> >
> >
> >
> > power_state is scheduled for removal, and it is used only write-only
> > by USB. Remove it.
>
> Greg, this patch is incomplete. Some of the settings that Pavel
> removed are used by the host controller drivers. Please revert this;
> I'll send a more complete patch later.
Alan is right, I was blind... and my config was not affected...
...
host/sl811-hcd.c: if (dev->dev.power.power_state.event == PM_EVENT_SUSPEND
misc/usbtest.c: if (intf->dev.power.power_state.event != PM_EVENT_ON) {
...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-pm] patch power_state-remove-it-from-usb.patch added to gregkh-2.6 tree
2008-02-21 22:22 ` Pavel Machek
@ 2008-02-21 22:33 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2008-02-21 22:33 UTC (permalink / raw)
To: Pavel Machek; +Cc: Alan Stern, greg, linux-kernel, linux-pm
On Thu, Feb 21, 2008 at 11:22:02PM +0100, Pavel Machek wrote:
> On Thu 2008-02-21 17:18:32, Alan Stern wrote:
> > On Thu, 21 Feb 2008 gregkh@suse.de wrote:
> >
> > > This is a note to let you know that I've just added the patch titled
> > >
> > > Subject: power_state: remove it from usb
> > >
> > > to my gregkh-2.6 tree. Its filename is
> > >
> > > power_state-remove-it-from-usb.patch
> > >
> > > This tree can be found at
> > > http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
> > >
> > >
> > > From pavel@ucw.cz Thu Feb 21 13:36:03 2008
> > > From: Pavel Machek <pavel@ucw.cz>
> > > Date: Thu, 21 Feb 2008 14:01:45 +0100
> > > Subject: power_state: remove it from usb
> > > To: kernel list <linux-kernel@vger.kernel.org>, Linux-pm mailing list <linux-pm@lists.osdl.org>, Greg KH <greg@kroah.com>, stern@rowland.harvard.edu, linux-usb@vger.kernel.org
> > > Message-ID: <20080221130145.GA3789@elf.ucw.cz>
> > > Content-Disposition: inline
> > >
> > >
> > >
> > > power_state is scheduled for removal, and it is used only write-only
> > > by USB. Remove it.
> >
> > Greg, this patch is incomplete. Some of the settings that Pavel
> > removed are used by the host controller drivers. Please revert this;
> > I'll send a more complete patch later.
>
> Alan is right, I was blind... and my config was not affected...
> ...
> host/sl811-hcd.c: if (dev->dev.power.power_state.event == PM_EVENT_SUSPEND
> misc/usbtest.c: if (intf->dev.power.power_state.event != PM_EVENT_ON) {
> ...
Will do, thanks for letting me know.
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: power_state: remove it from usb
2008-02-21 22:19 ` Pavel Machek
@ 2008-02-21 22:37 ` Alan Stern
0 siblings, 0 replies; 8+ messages in thread
From: Alan Stern @ 2008-02-21 22:37 UTC (permalink / raw)
To: Pavel Machek; +Cc: kernel list, Linux-pm mailing list, Greg KH, linux-usb
On Thu, 21 Feb 2008, Pavel Machek wrote:
> > Unfortunately some of the things you changed turn out not to be
> > write-only. (You also missed a usage of power.power_state in a
> > comment!)
>
> I might have missed comments, but where I missed read? It compiled
> after I removed the field from the core...?
Grep for power_state in drivers/usb/host/*.c.
Alan Stern
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-02-21 22:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-21 13:01 power_state: remove it from usb Pavel Machek
2008-02-21 21:43 ` patch power_state-remove-it-from-usb.patch added to gregkh-2.6 tree gregkh
2008-02-21 22:18 ` [linux-pm] " Alan Stern
2008-02-21 22:22 ` Pavel Machek
2008-02-21 22:33 ` Greg KH
2008-02-21 21:50 ` power_state: remove it from usb Alan Stern
2008-02-21 22:19 ` Pavel Machek
2008-02-21 22:37 ` Alan Stern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox