Commit 135db048 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

USB: ehci minor SOC bus glue fixes

Various minor fixes to some SOC bus glue for EHCI:

 - Remove a bogus copyright (by "me"!) which someone added to the FSL
   driver, and an irrelevant comment.

 - Un-break MODULE_ALIAS() directives after platform_bus hotplugging
   acquired a backwards-incompatible change.  (Which didn't fix ANY
   of the in-tree drivers it prevented from hotplugging -- sigh.)

 - Remove some bogus assignments of platform_bus_type; that's done by
   the platform_bus code.

 - Add some FIXMEs for drivers with that pointless two-level idiom for
   probe() and remove() routines.  ("Obfuscation" is a non-goal.)
   That should help avoid future bus glue which copies that idiom.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent caa9ef67
...@@ -237,6 +237,7 @@ static int ehci_hcd_au1xxx_drv_probe(struct platform_device *pdev) ...@@ -237,6 +237,7 @@ static int ehci_hcd_au1xxx_drv_probe(struct platform_device *pdev)
if (usb_disabled()) if (usb_disabled())
return -ENODEV; return -ENODEV;
/* FIXME we only want one one probe() not two */
ret = usb_ehci_au1xxx_probe(&ehci_au1xxx_hc_driver, &hcd, pdev); ret = usb_ehci_au1xxx_probe(&ehci_au1xxx_hc_driver, &hcd, pdev);
return ret; return ret;
} }
...@@ -245,6 +246,7 @@ static int ehci_hcd_au1xxx_drv_remove(struct platform_device *pdev) ...@@ -245,6 +246,7 @@ static int ehci_hcd_au1xxx_drv_remove(struct platform_device *pdev)
{ {
struct usb_hcd *hcd = platform_get_drvdata(pdev); struct usb_hcd *hcd = platform_get_drvdata(pdev);
/* FIXME we only want one one remove() not two */
usb_ehci_au1xxx_remove(hcd, pdev); usb_ehci_au1xxx_remove(hcd, pdev);
return 0; return 0;
} }
...@@ -265,7 +267,7 @@ static int ehci_hcd_au1xxx_drv_resume(struct device *dev) ...@@ -265,7 +267,7 @@ static int ehci_hcd_au1xxx_drv_resume(struct device *dev)
return 0; return 0;
} }
*/ */
MODULE_ALIAS("au1xxx-ehci"); MODULE_ALIAS("platform:au1xxx-ehci");
static struct platform_driver ehci_hcd_au1xxx_driver = { static struct platform_driver ehci_hcd_au1xxx_driver = {
.probe = ehci_hcd_au1xxx_drv_probe, .probe = ehci_hcd_au1xxx_drv_probe,
.remove = ehci_hcd_au1xxx_drv_remove, .remove = ehci_hcd_au1xxx_drv_remove,
...@@ -274,6 +276,5 @@ static struct platform_driver ehci_hcd_au1xxx_driver = { ...@@ -274,6 +276,5 @@ static struct platform_driver ehci_hcd_au1xxx_driver = {
/*.resume = ehci_hcd_au1xxx_drv_resume, */ /*.resume = ehci_hcd_au1xxx_drv_resume, */
.driver = { .driver = {
.name = "au1xxx-ehci", .name = "au1xxx-ehci",
.bus = &platform_bus_type
} }
}; };
/* /*
* (C) Copyright David Brownell 2000-2002
* Copyright (c) 2005 MontaVista Software * Copyright (c) 2005 MontaVista Software
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
...@@ -28,7 +27,6 @@ ...@@ -28,7 +27,6 @@
/* FIXME: Power Management is un-ported so temporarily disable it */ /* FIXME: Power Management is un-ported so temporarily disable it */
#undef CONFIG_PM #undef CONFIG_PM
/* PCI-based HCs are common, but plenty of non-PCI HCs are used too */
/* configure so an HC device and id are always provided */ /* configure so an HC device and id are always provided */
/* always called with process context; sleeping is OK */ /* always called with process context; sleeping is OK */
...@@ -331,6 +329,7 @@ static int ehci_fsl_drv_probe(struct platform_device *pdev) ...@@ -331,6 +329,7 @@ static int ehci_fsl_drv_probe(struct platform_device *pdev)
if (usb_disabled()) if (usb_disabled())
return -ENODEV; return -ENODEV;
/* FIXME we only want one one probe() not two */
return usb_hcd_fsl_probe(&ehci_fsl_hc_driver, pdev); return usb_hcd_fsl_probe(&ehci_fsl_hc_driver, pdev);
} }
...@@ -338,12 +337,12 @@ static int ehci_fsl_drv_remove(struct platform_device *pdev) ...@@ -338,12 +337,12 @@ static int ehci_fsl_drv_remove(struct platform_device *pdev)
{ {
struct usb_hcd *hcd = platform_get_drvdata(pdev); struct usb_hcd *hcd = platform_get_drvdata(pdev);
/* FIXME we only want one one remove() not two */
usb_hcd_fsl_remove(hcd, pdev); usb_hcd_fsl_remove(hcd, pdev);
return 0; return 0;
} }
MODULE_ALIAS("fsl-ehci"); MODULE_ALIAS("platform:fsl-ehci");
static struct platform_driver ehci_fsl_driver = { static struct platform_driver ehci_fsl_driver = {
.probe = ehci_fsl_drv_probe, .probe = ehci_fsl_drv_probe,
...@@ -351,5 +350,5 @@ static struct platform_driver ehci_fsl_driver = { ...@@ -351,5 +350,5 @@ static struct platform_driver ehci_fsl_driver = {
.shutdown = usb_hcd_platform_shutdown, .shutdown = usb_hcd_platform_shutdown,
.driver = { .driver = {
.name = "fsl-ehci", .name = "fsl-ehci",
}, },
}; };
...@@ -140,13 +140,12 @@ static int ixp4xx_ehci_remove(struct platform_device *pdev) ...@@ -140,13 +140,12 @@ static int ixp4xx_ehci_remove(struct platform_device *pdev)
return 0; return 0;
} }
MODULE_ALIAS("ixp4xx-ehci"); MODULE_ALIAS("platform:ixp4xx-ehci");
static struct platform_driver ixp4xx_ehci_driver = { static struct platform_driver ixp4xx_ehci_driver = {
.probe = ixp4xx_ehci_probe, .probe = ixp4xx_ehci_probe,
.remove = ixp4xx_ehci_remove, .remove = ixp4xx_ehci_remove,
.driver = { .driver = {
.name = "ixp4xx-ehci", .name = "ixp4xx-ehci",
.bus = &platform_bus_type
}, },
}; };
...@@ -175,6 +175,7 @@ static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev) ...@@ -175,6 +175,7 @@ static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev)
if (usb_disabled()) if (usb_disabled())
return -ENODEV; return -ENODEV;
/* FIXME we only want one one probe() not two */
ret = usb_ehci_ppc_soc_probe(&ehci_ppc_soc_hc_driver, &hcd, pdev); ret = usb_ehci_ppc_soc_probe(&ehci_ppc_soc_hc_driver, &hcd, pdev);
return ret; return ret;
} }
...@@ -183,17 +184,17 @@ static int ehci_hcd_ppc_soc_drv_remove(struct platform_device *pdev) ...@@ -183,17 +184,17 @@ static int ehci_hcd_ppc_soc_drv_remove(struct platform_device *pdev)
{ {
struct usb_hcd *hcd = platform_get_drvdata(pdev); struct usb_hcd *hcd = platform_get_drvdata(pdev);
/* FIXME we only want one one remove() not two */
usb_ehci_ppc_soc_remove(hcd, pdev); usb_ehci_ppc_soc_remove(hcd, pdev);
return 0; return 0;
} }
MODULE_ALIAS("ppc-soc-ehci"); MODULE_ALIAS("platform:ppc-soc-ehci");
static struct platform_driver ehci_ppc_soc_driver = { static struct platform_driver ehci_ppc_soc_driver = {
.probe = ehci_hcd_ppc_soc_drv_probe, .probe = ehci_hcd_ppc_soc_drv_probe,
.remove = ehci_hcd_ppc_soc_drv_remove, .remove = ehci_hcd_ppc_soc_drv_remove,
.shutdown = usb_hcd_platform_shutdown, .shutdown = usb_hcd_platform_shutdown,
.driver = { .driver = {
.name = "ppc-soc-ehci", .name = "ppc-soc-ehci",
.bus = &platform_bus_type
} }
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment