diff options
author | David Brownell <david-b@pacbell.net> | 2008-02-11 21:40:46 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-25 00:16:35 -0400 |
commit | 135db0485cdfa808d69420889ca4a2fad8aed9df (patch) | |
tree | fd21bc5d22e1e2a083998c19004f1bc286dfde85 | |
parent | caa9ef672a045ba0b19184cd3f872b583f066771 (diff) |
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: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/host/ehci-au1xxx.c | 5 | ||||
-rw-r--r-- | drivers/usb/host/ehci-fsl.c | 9 | ||||
-rw-r--r-- | drivers/usb/host/ehci-ixp4xx.c | 3 | ||||
-rw-r--r-- | drivers/usb/host/ehci-ppc-soc.c | 5 |
4 files changed, 11 insertions, 11 deletions
diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c index da7532d38bf1..8b5f991e949c 100644 --- a/drivers/usb/host/ehci-au1xxx.c +++ b/drivers/usb/host/ehci-au1xxx.c | |||
@@ -237,6 +237,7 @@ static int ehci_hcd_au1xxx_drv_probe(struct platform_device *pdev) | |||
237 | if (usb_disabled()) | 237 | if (usb_disabled()) |
238 | return -ENODEV; | 238 | return -ENODEV; |
239 | 239 | ||
240 | /* FIXME we only want one one probe() not two */ | ||
240 | ret = usb_ehci_au1xxx_probe(&ehci_au1xxx_hc_driver, &hcd, pdev); | 241 | ret = usb_ehci_au1xxx_probe(&ehci_au1xxx_hc_driver, &hcd, pdev); |
241 | return ret; | 242 | return ret; |
242 | } | 243 | } |
@@ -245,6 +246,7 @@ static int ehci_hcd_au1xxx_drv_remove(struct platform_device *pdev) | |||
245 | { | 246 | { |
246 | struct usb_hcd *hcd = platform_get_drvdata(pdev); | 247 | struct usb_hcd *hcd = platform_get_drvdata(pdev); |
247 | 248 | ||
249 | /* FIXME we only want one one remove() not two */ | ||
248 | usb_ehci_au1xxx_remove(hcd, pdev); | 250 | usb_ehci_au1xxx_remove(hcd, pdev); |
249 | return 0; | 251 | return 0; |
250 | } | 252 | } |
@@ -265,7 +267,7 @@ static int ehci_hcd_au1xxx_drv_resume(struct device *dev) | |||
265 | return 0; | 267 | return 0; |
266 | } | 268 | } |
267 | */ | 269 | */ |
268 | MODULE_ALIAS("au1xxx-ehci"); | 270 | MODULE_ALIAS("platform:au1xxx-ehci"); |
269 | static struct platform_driver ehci_hcd_au1xxx_driver = { | 271 | static struct platform_driver ehci_hcd_au1xxx_driver = { |
270 | .probe = ehci_hcd_au1xxx_drv_probe, | 272 | .probe = ehci_hcd_au1xxx_drv_probe, |
271 | .remove = ehci_hcd_au1xxx_drv_remove, | 273 | .remove = ehci_hcd_au1xxx_drv_remove, |
@@ -274,6 +276,5 @@ static struct platform_driver ehci_hcd_au1xxx_driver = { | |||
274 | /*.resume = ehci_hcd_au1xxx_drv_resume, */ | 276 | /*.resume = ehci_hcd_au1xxx_drv_resume, */ |
275 | .driver = { | 277 | .driver = { |
276 | .name = "au1xxx-ehci", | 278 | .name = "au1xxx-ehci", |
277 | .bus = &platform_bus_type | ||
278 | } | 279 | } |
279 | }; | 280 | }; |
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index adb0defa1631..6d9bed6c1f48 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * (C) Copyright David Brownell 2000-2002 | ||
3 | * Copyright (c) 2005 MontaVista Software | 2 | * Copyright (c) 2005 MontaVista Software |
4 | * | 3 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
@@ -28,7 +27,6 @@ | |||
28 | /* FIXME: Power Management is un-ported so temporarily disable it */ | 27 | /* FIXME: Power Management is un-ported so temporarily disable it */ |
29 | #undef CONFIG_PM | 28 | #undef CONFIG_PM |
30 | 29 | ||
31 | /* PCI-based HCs are common, but plenty of non-PCI HCs are used too */ | ||
32 | 30 | ||
33 | /* configure so an HC device and id are always provided */ | 31 | /* configure so an HC device and id are always provided */ |
34 | /* always called with process context; sleeping is OK */ | 32 | /* always called with process context; sleeping is OK */ |
@@ -331,6 +329,7 @@ static int ehci_fsl_drv_probe(struct platform_device *pdev) | |||
331 | if (usb_disabled()) | 329 | if (usb_disabled()) |
332 | return -ENODEV; | 330 | return -ENODEV; |
333 | 331 | ||
332 | /* FIXME we only want one one probe() not two */ | ||
334 | return usb_hcd_fsl_probe(&ehci_fsl_hc_driver, pdev); | 333 | return usb_hcd_fsl_probe(&ehci_fsl_hc_driver, pdev); |
335 | } | 334 | } |
336 | 335 | ||
@@ -338,12 +337,12 @@ static int ehci_fsl_drv_remove(struct platform_device *pdev) | |||
338 | { | 337 | { |
339 | struct usb_hcd *hcd = platform_get_drvdata(pdev); | 338 | struct usb_hcd *hcd = platform_get_drvdata(pdev); |
340 | 339 | ||
340 | /* FIXME we only want one one remove() not two */ | ||
341 | usb_hcd_fsl_remove(hcd, pdev); | 341 | usb_hcd_fsl_remove(hcd, pdev); |
342 | |||
343 | return 0; | 342 | return 0; |
344 | } | 343 | } |
345 | 344 | ||
346 | MODULE_ALIAS("fsl-ehci"); | 345 | MODULE_ALIAS("platform:fsl-ehci"); |
347 | 346 | ||
348 | static struct platform_driver ehci_fsl_driver = { | 347 | static struct platform_driver ehci_fsl_driver = { |
349 | .probe = ehci_fsl_drv_probe, | 348 | .probe = ehci_fsl_drv_probe, |
@@ -351,5 +350,5 @@ static struct platform_driver ehci_fsl_driver = { | |||
351 | .shutdown = usb_hcd_platform_shutdown, | 350 | .shutdown = usb_hcd_platform_shutdown, |
352 | .driver = { | 351 | .driver = { |
353 | .name = "fsl-ehci", | 352 | .name = "fsl-ehci", |
354 | }, | 353 | }, |
355 | }; | 354 | }; |
diff --git a/drivers/usb/host/ehci-ixp4xx.c b/drivers/usb/host/ehci-ixp4xx.c index 3041d8f055f4..601c8795a854 100644 --- a/drivers/usb/host/ehci-ixp4xx.c +++ b/drivers/usb/host/ehci-ixp4xx.c | |||
@@ -140,13 +140,12 @@ static int ixp4xx_ehci_remove(struct platform_device *pdev) | |||
140 | return 0; | 140 | return 0; |
141 | } | 141 | } |
142 | 142 | ||
143 | MODULE_ALIAS("ixp4xx-ehci"); | 143 | MODULE_ALIAS("platform:ixp4xx-ehci"); |
144 | 144 | ||
145 | static struct platform_driver ixp4xx_ehci_driver = { | 145 | static struct platform_driver ixp4xx_ehci_driver = { |
146 | .probe = ixp4xx_ehci_probe, | 146 | .probe = ixp4xx_ehci_probe, |
147 | .remove = ixp4xx_ehci_remove, | 147 | .remove = ixp4xx_ehci_remove, |
148 | .driver = { | 148 | .driver = { |
149 | .name = "ixp4xx-ehci", | 149 | .name = "ixp4xx-ehci", |
150 | .bus = &platform_bus_type | ||
151 | }, | 150 | }, |
152 | }; | 151 | }; |
diff --git a/drivers/usb/host/ehci-ppc-soc.c b/drivers/usb/host/ehci-ppc-soc.c index a3249078c808..6c76036783a1 100644 --- a/drivers/usb/host/ehci-ppc-soc.c +++ b/drivers/usb/host/ehci-ppc-soc.c | |||
@@ -175,6 +175,7 @@ static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev) | |||
175 | if (usb_disabled()) | 175 | if (usb_disabled()) |
176 | return -ENODEV; | 176 | return -ENODEV; |
177 | 177 | ||
178 | /* FIXME we only want one one probe() not two */ | ||
178 | ret = usb_ehci_ppc_soc_probe(&ehci_ppc_soc_hc_driver, &hcd, pdev); | 179 | ret = usb_ehci_ppc_soc_probe(&ehci_ppc_soc_hc_driver, &hcd, pdev); |
179 | return ret; | 180 | return ret; |
180 | } | 181 | } |
@@ -183,17 +184,17 @@ static int ehci_hcd_ppc_soc_drv_remove(struct platform_device *pdev) | |||
183 | { | 184 | { |
184 | struct usb_hcd *hcd = platform_get_drvdata(pdev); | 185 | struct usb_hcd *hcd = platform_get_drvdata(pdev); |
185 | 186 | ||
187 | /* FIXME we only want one one remove() not two */ | ||
186 | usb_ehci_ppc_soc_remove(hcd, pdev); | 188 | usb_ehci_ppc_soc_remove(hcd, pdev); |
187 | return 0; | 189 | return 0; |
188 | } | 190 | } |
189 | 191 | ||
190 | MODULE_ALIAS("ppc-soc-ehci"); | 192 | MODULE_ALIAS("platform:ppc-soc-ehci"); |
191 | static struct platform_driver ehci_ppc_soc_driver = { | 193 | static struct platform_driver ehci_ppc_soc_driver = { |
192 | .probe = ehci_hcd_ppc_soc_drv_probe, | 194 | .probe = ehci_hcd_ppc_soc_drv_probe, |
193 | .remove = ehci_hcd_ppc_soc_drv_remove, | 195 | .remove = ehci_hcd_ppc_soc_drv_remove, |
194 | .shutdown = usb_hcd_platform_shutdown, | 196 | .shutdown = usb_hcd_platform_shutdown, |
195 | .driver = { | 197 | .driver = { |
196 | .name = "ppc-soc-ehci", | 198 | .name = "ppc-soc-ehci", |
197 | .bus = &platform_bus_type | ||
198 | } | 199 | } |
199 | }; | 200 | }; |