aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-fsl.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2006-04-11 11:07:16 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 18:04:09 -0400
commit01cced250722d22d99c2342979490f93ca886521 (patch)
treeb29b395305836a0f3690a69173e1df2a2f0ecf4f /drivers/usb/host/ehci-fsl.c
parentdf47e5330b0f5decb0a5736e9a81fff49d46d151 (diff)
[PATCH] USB: allow multiple types of EHCI controllers to be built as modules
In some systems we may have both a platform EHCI controller and PCI EHCI controller. Previously we couldn't build the EHCI support as a module due to conflicting module_init() calls in the code. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-fsl.c')
-rw-r--r--drivers/usb/host/ehci-fsl.c37
1 files changed, 3 insertions, 34 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index f985f121a245..a49a689bf423 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -324,43 +324,12 @@ static int ehci_fsl_drv_remove(struct platform_device *pdev)
324 return 0; 324 return 0;
325} 325}
326 326
327static struct platform_driver ehci_fsl_dr_driver = { 327MODULE_ALIAS("fsl-ehci");
328 .probe = ehci_fsl_drv_probe,
329 .remove = ehci_fsl_drv_remove,
330 .driver = {
331 .name = "fsl-usb2-dr",
332 },
333};
334 328
335static struct platform_driver ehci_fsl_mph_driver = { 329static struct platform_driver ehci_fsl_driver = {
336 .probe = ehci_fsl_drv_probe, 330 .probe = ehci_fsl_drv_probe,
337 .remove = ehci_fsl_drv_remove, 331 .remove = ehci_fsl_drv_remove,
338 .driver = { 332 .driver = {
339 .name = "fsl-usb2-mph", 333 .name = "fsl-ehci",
340 }, 334 },
341}; 335};
342
343static int __init ehci_fsl_init(void)
344{
345 int retval;
346
347 pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",
348 hcd_name,
349 sizeof(struct ehci_qh), sizeof(struct ehci_qtd),
350 sizeof(struct ehci_itd), sizeof(struct ehci_sitd));
351
352 retval = platform_driver_register(&ehci_fsl_dr_driver);
353 if (retval)
354 return retval;
355
356 return platform_driver_register(&ehci_fsl_mph_driver);
357}
358
359static void __exit ehci_fsl_cleanup(void)
360{
361 platform_driver_unregister(&ehci_fsl_mph_driver);
362 platform_driver_unregister(&ehci_fsl_dr_driver);
363}
364
365module_init(ehci_fsl_init);
366module_exit(ehci_fsl_cleanup);