linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ohci: avoid an unused variable warning
@ 2007-12-13  9:06 Jan Beulich
  2007-12-14  8:56 ` David Brownell
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2007-12-13  9:06 UTC (permalink / raw)
  To: dbrownell; +Cc: linux-kernel

With CONFIG_PM, but without CONFIG_PM_SLEEP, the intention of the
conditional in ohci_pci_start() doesn't work since device_may_wakeup()
references pdev only with the latter config option.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

 drivers/usb/host/ohci-pci.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.24-rc5/drivers/usb/host/ohci-pci.c	2007-12-12 11:29:07.000000000 +0100
+++ 2.6.24-rc5-ohci-pm-sleep/drivers/usb/host/ohci-pci.c	2007-12-04 16:09:33.000000000 +0100
@@ -217,7 +217,7 @@ static int __devinit ohci_pci_start (str
 	struct ohci_hcd	*ohci = hcd_to_ohci (hcd);
 	int		ret;
 
-#ifdef CONFIG_PM /* avoid warnings about unused pdev */
+#ifdef CONFIG_PM_SLEEP /* avoid warnings about unused pdev */
 	if (hcd->self.controller) {
 		struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
 




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ohci: avoid an unused variable warning
  2007-12-13  9:06 [PATCH] ohci: avoid an unused variable warning Jan Beulich
@ 2007-12-14  8:56 ` David Brownell
  0 siblings, 0 replies; 2+ messages in thread
From: David Brownell @ 2007-12-14  8:56 UTC (permalink / raw)
  To: Jan Beulich; +Cc: linux-kernel

On Thursday 13 December 2007, Jan Beulich wrote:
> 
> With CONFIG_PM, but without CONFIG_PM_SLEEP, the intention of the
> conditional in ohci_pci_start() doesn't work since device_may_wakeup()
> references pdev only with the latter config option.

Yuck.  That means that runtime power management won't work correctly.

The same wakeup mechanisms that apply during SUSPEND and HIBERNATION
are also used for runtime PM(*) ... which is allowed by CONFIG_PM, and
which accordingly should not depend on PM_SLEEP.

I think the bug is that device_may_wakeup() now looks at CONFIG_PM_SLEEP
instead of just CONFIG_PM.

- Dave

(*) Although ACPI has problems with the notion of runtime PM.  For
    example, it ignores PCI PME# signaling until PM_SLEEP transitions.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-14  8:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-13  9:06 [PATCH] ohci: avoid an unused variable warning Jan Beulich
2007-12-14  8:56 ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).