[PATCH] USB: fix build on OMAPs if CONFIG_PM_RUNTIME is not set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With patch as1329 (USB: convert to the runtime PM framework),
we make USB_SUSPEND depend on PM_RUNTIME instead of CONFIG_PM.

Also, CONFIG_USB_OTG selects CONFIG_USB_SUSPEND.

If PM_RUNTIME is not enabled, and we try to enable USB_OTG,
we will end up with CONFIG_USB_SUSPEND selected. This is
due to a known bug with the select statement.

This makes the build break on various OMAP configs (which
have CONFIG_USB_OTG set by default, but do not yet have
CONFIG_PM_RUNTIME enabled).

Avoid this by changing the logic for CONFIG_USB_OTG from
"select USB_SUSPEND" to "depends on USB_SUSPEND"

Signed-off-by: Anand Gadiyar <gadiyar@xxxxxx>
CC: Michal Marek <mmarek@xxxxxxx>
CC: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
---
This was discussed on [1] and the change was suggested
by Michal
[1] http://marc.info/?l=linux-usb&m=126641717120339&w=2

This patch will be needed once as1329 gets merged.
This is in the queue for the .34 merge window

Compile tested various OMAP defconfigs with this patch.
USB_OTG gets disabled as expected, as does USB_SUSPEND.

The defconfigs need to be updated to enable CONFIG_PM_RUNTIME.
I'll post those patches separately to the linux-omap list.
As of now, it looks like only OMAP boards select USB_OTG by
default and are the only ones affected.

 drivers/usb/core/Kconfig |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6/drivers/usb/core/Kconfig
===================================================================
--- linux-2.6.orig/drivers/usb/core/Kconfig	2010-02-21 16:08:50.000000000 +0530
+++ linux-2.6/drivers/usb/core/Kconfig	2010-02-21 16:08:56.000000000 +0530
@@ -91,8 +91,8 @@ config USB_DYNAMIC_MINORS
 	  If you are unsure about this, say N here.
 
 config USB_SUSPEND
-	bool "USB selective suspend/resume and wakeup"
-	depends on USB && PM
+	bool "USB runtime power management (suspend/resume and wakeup)"
+	depends on USB && PM_RUNTIME
 	help
 	  If you say Y here, you can use driver calls or the sysfs
 	  "power/level" file to suspend or resume individual USB
@@ -109,7 +109,7 @@ config USB_SUSPEND
 config USB_OTG
 	bool
 	depends on USB && EXPERIMENTAL
-	select USB_SUSPEND
+	depends on USB_SUSPEND
 	default n
 
 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux