aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-au1xxx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ohci-au1xxx.c')
-rw-r--r--drivers/usb/host/ohci-au1xxx.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c
index 3981bf15c8c7..d9cf3b327d96 100644
--- a/drivers/usb/host/ohci-au1xxx.c
+++ b/drivers/usb/host/ohci-au1xxx.c
@@ -18,6 +18,8 @@
18 * This file is licenced under the GPL. 18 * This file is licenced under the GPL.
19 */ 19 */
20 20
21#include <linux/platform_device.h>
22
21#include <asm/mach-au1x00/au1000.h> 23#include <asm/mach-au1x00/au1000.h>
22 24
23#define USBH_ENABLE_BE (1<<0) 25#define USBH_ENABLE_BE (1<<0)
@@ -214,13 +216,17 @@ static const struct hc_driver ohci_au1xxx_hc_driver = {
214 */ 216 */
215 .hub_status_data = ohci_hub_status_data, 217 .hub_status_data = ohci_hub_status_data,
216 .hub_control = ohci_hub_control, 218 .hub_control = ohci_hub_control,
219#ifdef CONFIG_PM
220 .bus_suspend = ohci_bus_suspend,
221 .bus_resume = ohci_bus_resume,
222#endif
223 .start_port_reset = ohci_start_port_reset,
217}; 224};
218 225
219/*-------------------------------------------------------------------------*/ 226/*-------------------------------------------------------------------------*/
220 227
221static int ohci_hcd_au1xxx_drv_probe(struct device *dev) 228static int ohci_hcd_au1xxx_drv_probe(struct platform_device *pdev)
222{ 229{
223 struct platform_device *pdev = to_platform_device(dev);
224 int ret; 230 int ret;
225 231
226 pr_debug ("In ohci_hcd_au1xxx_drv_probe"); 232 pr_debug ("In ohci_hcd_au1xxx_drv_probe");
@@ -232,38 +238,37 @@ static int ohci_hcd_au1xxx_drv_probe(struct device *dev)
232 return ret; 238 return ret;
233} 239}
234 240
235static int ohci_hcd_au1xxx_drv_remove(struct device *dev) 241static int ohci_hcd_au1xxx_drv_remove(struct platform_device *pdev)
236{ 242{
237 struct platform_device *pdev = to_platform_device(dev); 243 struct usb_hcd *hcd = platform_get_drvdata(pdev);
238 struct usb_hcd *hcd = dev_get_drvdata(dev);
239 244
240 usb_hcd_au1xxx_remove(hcd, pdev); 245 usb_hcd_au1xxx_remove(hcd, pdev);
241 return 0; 246 return 0;
242} 247}
243 /*TBD*/ 248 /*TBD*/
244/*static int ohci_hcd_au1xxx_drv_suspend(struct device *dev) 249/*static int ohci_hcd_au1xxx_drv_suspend(struct platform_device *dev)
245{ 250{
246 struct platform_device *pdev = to_platform_device(dev); 251 struct usb_hcd *hcd = platform_get_drvdata(dev);
247 struct usb_hcd *hcd = dev_get_drvdata(dev);
248 252
249 return 0; 253 return 0;
250} 254}
251static int ohci_hcd_au1xxx_drv_resume(struct device *dev) 255static int ohci_hcd_au1xxx_drv_resume(struct platform_device *dev)
252{ 256{
253 struct platform_device *pdev = to_platform_device(dev); 257 struct usb_hcd *hcd = platform_get_drvdata(dev);
254 struct usb_hcd *hcd = dev_get_drvdata(dev);
255 258
256 return 0; 259 return 0;
257} 260}
258*/ 261*/
259 262
260static struct device_driver ohci_hcd_au1xxx_driver = { 263static struct platform_driver ohci_hcd_au1xxx_driver = {
261 .name = "au1xxx-ohci",
262 .bus = &platform_bus_type,
263 .probe = ohci_hcd_au1xxx_drv_probe, 264 .probe = ohci_hcd_au1xxx_drv_probe,
264 .remove = ohci_hcd_au1xxx_drv_remove, 265 .remove = ohci_hcd_au1xxx_drv_remove,
265 /*.suspend = ohci_hcd_au1xxx_drv_suspend, */ 266 /*.suspend = ohci_hcd_au1xxx_drv_suspend, */
266 /*.resume = ohci_hcd_au1xxx_drv_resume, */ 267 /*.resume = ohci_hcd_au1xxx_drv_resume, */
268 .driver = {
269 .name = "au1xxx-ohci",
270 .owner = THIS_MODULE,
271 },
267}; 272};
268 273
269static int __init ohci_hcd_au1xxx_init (void) 274static int __init ohci_hcd_au1xxx_init (void)
@@ -272,12 +277,12 @@ static int __init ohci_hcd_au1xxx_init (void)
272 pr_debug ("block sizes: ed %d td %d\n", 277 pr_debug ("block sizes: ed %d td %d\n",
273 sizeof (struct ed), sizeof (struct td)); 278 sizeof (struct ed), sizeof (struct td));
274 279
275 return driver_register(&ohci_hcd_au1xxx_driver); 280 return platform_driver_register(&ohci_hcd_au1xxx_driver);
276} 281}
277 282
278static void __exit ohci_hcd_au1xxx_cleanup (void) 283static void __exit ohci_hcd_au1xxx_cleanup (void)
279{ 284{
280 driver_unregister(&ohci_hcd_au1xxx_driver); 285 platform_driver_unregister(&ohci_hcd_au1xxx_driver);
281} 286}
282 287
283module_init (ohci_hcd_au1xxx_init); 288module_init (ohci_hcd_au1xxx_init);