Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Brownell and committed by
Greg Kroah-Hartman
135db048 caa9ef67

+11 -11
+3 -2
drivers/usb/host/ehci-au1xxx.c
··· 237 237 if (usb_disabled()) 238 238 return -ENODEV; 239 239 240 + /* FIXME we only want one one probe() not two */ 240 241 ret = usb_ehci_au1xxx_probe(&ehci_au1xxx_hc_driver, &hcd, pdev); 241 242 return ret; 242 243 } ··· 246 245 { 247 246 struct usb_hcd *hcd = platform_get_drvdata(pdev); 248 247 248 + /* FIXME we only want one one remove() not two */ 249 249 usb_ehci_au1xxx_remove(hcd, pdev); 250 250 return 0; 251 251 } ··· 267 265 return 0; 268 266 } 269 267 */ 270 - MODULE_ALIAS("au1xxx-ehci"); 268 + MODULE_ALIAS("platform:au1xxx-ehci"); 271 269 static struct platform_driver ehci_hcd_au1xxx_driver = { 272 270 .probe = ehci_hcd_au1xxx_drv_probe, 273 271 .remove = ehci_hcd_au1xxx_drv_remove, ··· 276 274 /*.resume = ehci_hcd_au1xxx_drv_resume, */ 277 275 .driver = { 278 276 .name = "au1xxx-ehci", 279 - .bus = &platform_bus_type 280 277 } 281 278 };
+4 -5
drivers/usb/host/ehci-fsl.c
··· 1 1 /* 2 - * (C) Copyright David Brownell 2000-2002 3 2 * Copyright (c) 2005 MontaVista Software 4 3 * 5 4 * This program is free software; you can redistribute it and/or modify it ··· 27 28 /* FIXME: Power Management is un-ported so temporarily disable it */ 28 29 #undef CONFIG_PM 29 30 30 - /* PCI-based HCs are common, but plenty of non-PCI HCs are used too */ 31 31 32 32 /* configure so an HC device and id are always provided */ 33 33 /* always called with process context; sleeping is OK */ ··· 329 331 if (usb_disabled()) 330 332 return -ENODEV; 331 333 334 + /* FIXME we only want one one probe() not two */ 332 335 return usb_hcd_fsl_probe(&ehci_fsl_hc_driver, pdev); 333 336 } 334 337 ··· 337 338 { 338 339 struct usb_hcd *hcd = platform_get_drvdata(pdev); 339 340 341 + /* FIXME we only want one one remove() not two */ 340 342 usb_hcd_fsl_remove(hcd, pdev); 341 - 342 343 return 0; 343 344 } 344 345 345 - MODULE_ALIAS("fsl-ehci"); 346 + MODULE_ALIAS("platform:fsl-ehci"); 346 347 347 348 static struct platform_driver ehci_fsl_driver = { 348 349 .probe = ehci_fsl_drv_probe, ··· 350 351 .shutdown = usb_hcd_platform_shutdown, 351 352 .driver = { 352 353 .name = "fsl-ehci", 353 - }, 354 + }, 354 355 };
+1 -2
drivers/usb/host/ehci-ixp4xx.c
··· 140 140 return 0; 141 141 } 142 142 143 - MODULE_ALIAS("ixp4xx-ehci"); 143 + MODULE_ALIAS("platform:ixp4xx-ehci"); 144 144 145 145 static struct platform_driver ixp4xx_ehci_driver = { 146 146 .probe = ixp4xx_ehci_probe, 147 147 .remove = ixp4xx_ehci_remove, 148 148 .driver = { 149 149 .name = "ixp4xx-ehci", 150 - .bus = &platform_bus_type 151 150 }, 152 151 };
+3 -2
drivers/usb/host/ehci-ppc-soc.c
··· 175 175 if (usb_disabled()) 176 176 return -ENODEV; 177 177 178 + /* FIXME we only want one one probe() not two */ 178 179 ret = usb_ehci_ppc_soc_probe(&ehci_ppc_soc_hc_driver, &hcd, pdev); 179 180 return ret; 180 181 } ··· 184 183 { 185 184 struct usb_hcd *hcd = platform_get_drvdata(pdev); 186 185 186 + /* FIXME we only want one one remove() not two */ 187 187 usb_ehci_ppc_soc_remove(hcd, pdev); 188 188 return 0; 189 189 } 190 190 191 - MODULE_ALIAS("ppc-soc-ehci"); 191 + MODULE_ALIAS("platform:ppc-soc-ehci"); 192 192 static struct platform_driver ehci_ppc_soc_driver = { 193 193 .probe = ehci_hcd_ppc_soc_drv_probe, 194 194 .remove = ehci_hcd_ppc_soc_drv_remove, 195 195 .shutdown = usb_hcd_platform_shutdown, 196 196 .driver = { 197 197 .name = "ppc-soc-ehci", 198 - .bus = &platform_bus_type 199 198 } 200 199 };