aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host/ohci-lh7a404.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-11-09 22:32:44 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-11-09 22:32:44 +0000
commit3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (patch)
treed8825be54cefb6ad6707478d719c8e30605bee7b /drivers/usb/host/ohci-lh7a404.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-lh7a404.c')
-rw-r--r--drivers/usb/host/ohci-lh7a404.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/drivers/usb/host/ohci-lh7a404.c b/drivers/usb/host/ohci-lh7a404.c
index 336c766c6e2..081ec3f5cff 100644
--- a/drivers/usb/host/ohci-lh7a404.c
+++ b/drivers/usb/host/ohci-lh7a404.c
@@ -204,9 +204,8 @@ static const struct hc_driver ohci_lh7a404_hc_driver = {
/*-------------------------------------------------------------------------*/
-static int ohci_hcd_lh7a404_drv_probe(struct device *dev)
+static int ohci_hcd_lh7a404_drv_probe(struct platform_device *pdev)
{
- struct platform_device *pdev = to_platform_device(dev);
int ret;
pr_debug ("In ohci_hcd_lh7a404_drv_probe");
@@ -218,40 +217,38 @@ static int ohci_hcd_lh7a404_drv_probe(struct device *dev)
return ret;
}
-static int ohci_hcd_lh7a404_drv_remove(struct device *dev)
+static int ohci_hcd_lh7a404_drv_remove(struct platform_device *pdev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct usb_hcd *hcd = dev_get_drvdata(dev);
+ struct usb_hcd *hcd = platform_get_drvdata(dev);
usb_hcd_lh7a404_remove(hcd, pdev);
return 0;
}
/*TBD*/
-/*static int ohci_hcd_lh7a404_drv_suspend(struct device *dev)
+/*static int ohci_hcd_lh7a404_drv_suspend(struct platform_device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct usb_hcd *hcd = dev_get_drvdata(dev);
+ struct usb_hcd *hcd = platform_get_drvdata(dev);
return 0;
}
-static int ohci_hcd_lh7a404_drv_resume(struct device *dev)
+static int ohci_hcd_lh7a404_drv_resume(struct platform_device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct usb_hcd *hcd = dev_get_drvdata(dev);
+ struct usb_hcd *hcd = platform_get_drvdata(dev);
return 0;
}
*/
-static struct device_driver ohci_hcd_lh7a404_driver = {
- .name = "lh7a404-ohci",
- .owner = THIS_MODULE,
- .bus = &platform_bus_type,
+static struct platform_driver ohci_hcd_lh7a404_driver = {
.probe = ohci_hcd_lh7a404_drv_probe,
.remove = ohci_hcd_lh7a404_drv_remove,
/*.suspend = ohci_hcd_lh7a404_drv_suspend, */
/*.resume = ohci_hcd_lh7a404_drv_resume, */
+ .driver = {
+ .name = "lh7a404-ohci",
+ .owner = THIS_MODULE,
+ },
};
static int __init ohci_hcd_lh7a404_init (void)
@@ -260,12 +257,12 @@ static int __init ohci_hcd_lh7a404_init (void)
pr_debug ("block sizes: ed %d td %d\n",
sizeof (struct ed), sizeof (struct td));
- return driver_register(&ohci_hcd_lh7a404_driver);
+ return platform_driver_register(&ohci_hcd_lh7a404_driver);
}
static void __exit ohci_hcd_lh7a404_cleanup (void)
{
- driver_unregister(&ohci_hcd_lh7a404_driver);
+ platform_driver_unregister(&ohci_hcd_lh7a404_driver);
}
module_init (ohci_hcd_lh7a404_init);