aboutsummaryrefslogtreecommitdiffstats
path: root/usb.current
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2008-06-13 17:51:53 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-06-13 17:51:53 -0700
commitdc2b6c18831a588b9d2a5e789866ccd2baea1f43 (patch)
tree7b74b5122688854d5af9f0130ed52025f0efde08 /usb.current
parenteb7a10e0b558a2c48d113bad27098adf5d82ac90 (diff)
downloadpatches-dc2b6c18831a588b9d2a5e789866ccd2baea1f43.tar.gz
more patches added
Diffstat (limited to 'usb.current')
-rw-r--r--usb.current/ohci-fix-problem-if-sm501-and-another-platform-driver-is-selected.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/usb.current/ohci-fix-problem-if-sm501-and-another-platform-driver-is-selected.patch b/usb.current/ohci-fix-problem-if-sm501-and-another-platform-driver-is-selected.patch
new file mode 100644
index 00000000000000..7821beda1119b3
--- /dev/null
+++ b/usb.current/ohci-fix-problem-if-sm501-and-another-platform-driver-is-selected.patch
@@ -0,0 +1,73 @@
+From ben-linux@fluff.org Fri Jun 13 17:39:48 2008
+From: Ben Dooks <ben-linux@fluff.org>
+Date: Sun, 08 Jun 2008 17:20:11 +0100
+Subject: OHCI: Fix problem if SM501 and another platform driver is selected
+To: linux-usb@vger.kernel.org
+Cc: Ben Dooks <ben-linux@fluff.org>
+Message-ID: <20080608162011.190329883@fluff.org.uk>
+
+From: Ben Dooks <ben-linux@fluff.org>
+
+If the SM501 and another platform driver, such as the SM501
+then we end up defining PLATFORM_DRIVER twice. This patch
+seperated the SM501 onto a seperate define of SM501_OHCI_DRIVER
+so that it can be selected without overwriting the original
+definition.
+
+Signed-off-by: Ben Dooks <ben-linux@fluff.org>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ohci-hcd.c | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/host/ohci-hcd.c
++++ b/drivers/usb/host/ohci-hcd.c
+@@ -1054,7 +1054,7 @@ MODULE_LICENSE ("GPL");
+
+ #ifdef CONFIG_MFD_SM501
+ #include "ohci-sm501.c"
+-#define PLATFORM_DRIVER ohci_hcd_sm501_driver
++#define SM501_OHCI_DRIVER ohci_hcd_sm501_driver
+ #endif
+
+ #if !defined(PCI_DRIVER) && \
+@@ -1062,6 +1062,7 @@ MODULE_LICENSE ("GPL");
+ !defined(OF_PLATFORM_DRIVER) && \
+ !defined(SA1111_DRIVER) && \
+ !defined(PS3_SYSTEM_BUS_DRIVER) && \
++ !defined(SM501_OHCI_DRIVER) && \
+ !defined(SSB_OHCI_DRIVER)
+ #error "missing bus glue for ohci-hcd"
+ #endif
+@@ -1121,9 +1122,18 @@ static int __init ohci_hcd_mod_init(void
+ goto error_ssb;
+ #endif
+
++#ifdef SM501_OHCI_DRIVER
++ retval = platform_driver_register(&SM501_OHCI_DRIVER);
++ if (retval < 0)
++ goto error_sm501;
++#endif
++
+ return retval;
+
+ /* Error path */
++#ifdef SM501_OHCI_DRIVER
++ error_sm501:
++#endif
+ #ifdef SSB_OHCI_DRIVER
+ error_ssb:
+ #endif
+@@ -1159,6 +1169,9 @@ module_init(ohci_hcd_mod_init);
+
+ static void __exit ohci_hcd_mod_exit(void)
+ {
++#ifdef SM501_OHCI_DRIVER
++ platform_driver_unregister(&SM501_OHCI_DRIVER);
++#endif
+ #ifdef SSB_OHCI_DRIVER
+ ssb_driver_unregister(&SSB_OHCI_DRIVER);
+ #endif