aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-s3c2410.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-11-09 17:32:44 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-11-09 17:32:44 -0500
commit3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (patch)
treed8825be54cefb6ad6707478d719c8e30605bee7b /drivers/usb/host/ohci-s3c2410.c
parent00d3dcdd96646be6059cc21f2efa94c4edc1eda5 (diff)
[DRIVER MODEL] Convert platform drivers to use struct platform_driver
This allows us to eliminate the casts in the drivers, and eventually remove the use of the device_driver function pointer methods for platform device drivers. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ohci-s3c2410.c')
-rw-r--r--drivers/usb/host/ohci-s3c2410.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c
index ee1fc605b402..35cc9402adc0 100644
--- a/drivers/usb/host/ohci-s3c2410.c
+++ b/drivers/usb/host/ohci-s3c2410.c
@@ -459,39 +459,38 @@ static const struct hc_driver ohci_s3c2410_hc_driver = {
459 459
460/* device driver */ 460/* device driver */
461 461
462static int ohci_hcd_s3c2410_drv_probe(struct device *dev) 462static int ohci_hcd_s3c2410_drv_probe(struct platform_device *pdev)
463{ 463{
464 struct platform_device *pdev = to_platform_device(dev);
465 return usb_hcd_s3c2410_probe(&ohci_s3c2410_hc_driver, pdev); 464 return usb_hcd_s3c2410_probe(&ohci_s3c2410_hc_driver, pdev);
466} 465}
467 466
468static int ohci_hcd_s3c2410_drv_remove(struct device *dev) 467static int ohci_hcd_s3c2410_drv_remove(struct platform_device *pdev)
469{ 468{
470 struct platform_device *pdev = to_platform_device(dev); 469 struct usb_hcd *hcd = platform_get_drvdata(pdev);
471 struct usb_hcd *hcd = dev_get_drvdata(dev);
472 470
473 usb_hcd_s3c2410_remove(hcd, pdev); 471 usb_hcd_s3c2410_remove(hcd, pdev);
474 return 0; 472 return 0;
475} 473}
476 474
477static struct device_driver ohci_hcd_s3c2410_driver = { 475static struct platform_driver ohci_hcd_s3c2410_driver = {
478 .name = "s3c2410-ohci",
479 .owner = THIS_MODULE,
480 .bus = &platform_bus_type,
481 .probe = ohci_hcd_s3c2410_drv_probe, 476 .probe = ohci_hcd_s3c2410_drv_probe,
482 .remove = ohci_hcd_s3c2410_drv_remove, 477 .remove = ohci_hcd_s3c2410_drv_remove,
483 /*.suspend = ohci_hcd_s3c2410_drv_suspend, */ 478 /*.suspend = ohci_hcd_s3c2410_drv_suspend, */
484 /*.resume = ohci_hcd_s3c2410_drv_resume, */ 479 /*.resume = ohci_hcd_s3c2410_drv_resume, */
480 .driver = {
481 .owner = THIS_MODULE,
482 .name = "s3c2410-ohci",
483 },
485}; 484};
486 485
487static int __init ohci_hcd_s3c2410_init (void) 486static int __init ohci_hcd_s3c2410_init (void)
488{ 487{
489 return driver_register(&ohci_hcd_s3c2410_driver); 488 return platform_driver_register(&ohci_hcd_s3c2410_driver);
490} 489}
491 490
492static void __exit ohci_hcd_s3c2410_cleanup (void) 491static void __exit ohci_hcd_s3c2410_cleanup (void)
493{ 492{
494 driver_unregister(&ohci_hcd_s3c2410_driver); 493 platform_driver_unregister(&ohci_hcd_s3c2410_driver);
495} 494}
496 495
497module_init (ohci_hcd_s3c2410_init); 496module_init (ohci_hcd_s3c2410_init);