summaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-3.6/002-usb-host-ohci-platform-BUG_ON-to-WARN_ON-on-probe.patch
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-12-22 12:11:06 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-12-22 12:11:06 +0000
commitc4dd6997f28704d3dae7022cc60be73705a107b7 (patch)
treedfa1b2ac5efdca78a6a7c7489eb41a94a38fd698 /target/linux/generic/patches-3.6/002-usb-host-ohci-platform-BUG_ON-to-WARN_ON-on-probe.patch
parent26bf467fae87a149e9647880755099a80ed6a411 (diff)
generic/3.6: add platform specific power callbacks to {e,o}hci_platform drivers
Backport of upstream commits: 86e4cb35f2260374df4139c2352afe7fe247cb60 usb: host: ehci-platform: BUG_ON() to WARN_ON() on probe b6dd245c4594482d46507a0bfd100439be367952 usb: host: ohci-platform: BUG_ON() to WARN_ON() on probe 04216bedafb1b3992a6c2b7f1518281d2ba5fc7b usb: host: ehci-platform: add platform specific power callback e4d37aeb373a5edceecc1dadc76fabbe8bc18e44 usb: host: ohci-platform: addplatform specific power callback Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34842 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.6/002-usb-host-ohci-platform-BUG_ON-to-WARN_ON-on-probe.patch')
-rw-r--r--target/linux/generic/patches-3.6/002-usb-host-ohci-platform-BUG_ON-to-WARN_ON-on-probe.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.6/002-usb-host-ohci-platform-BUG_ON-to-WARN_ON-on-probe.patch b/target/linux/generic/patches-3.6/002-usb-host-ohci-platform-BUG_ON-to-WARN_ON-on-probe.patch
new file mode 100644
index 000000000..68e8a7a35
--- /dev/null
+++ b/target/linux/generic/patches-3.6/002-usb-host-ohci-platform-BUG_ON-to-WARN_ON-on-probe.patch
@@ -0,0 +1,36 @@
+From b6dd245c4594482d46507a0bfd100439be367952 Mon Sep 17 00:00:00 2001
+From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Date: Mon, 6 Aug 2012 18:07:30 -0700
+Subject: [PATCH] usb: host: ohci-platform: BUG_ON() to WARN_ON() on probe
+
+Commit b6dd245c4594482d46507a0bfd100439be367952 upstream.
+
+usb_ohci_pdata is certainly required in ohci-platform driver.
+This patch avoids using BUG_ON() from driver,
+and return from probe with WARN_ON() if pdata was NULL.
+
+Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/ohci-platform.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/host/ohci-platform.c
++++ b/drivers/usb/host/ohci-platform.c
+@@ -83,10 +83,14 @@ static int __devinit ohci_platform_probe
+ {
+ struct usb_hcd *hcd;
+ struct resource *res_mem;
++ struct usb_ohci_pdata *pdata = dev->dev.platform_data;
+ int irq;
+ int err = -ENOMEM;
+
+- BUG_ON(!dev->dev.platform_data);
++ if (!pdata) {
++ WARN_ON(1);
++ return -ENODEV;
++ }
+
+ if (usb_disabled())
+ return -ENODEV;