diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-02-22 23:08:34 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-02-28 15:22:45 -0500 |
commit | d35fb6417655ebf6de93e2135dc386c3c470f545 (patch) | |
tree | 23eade825b224e48ab300017395ddd92db837da0 /drivers/usb/gadget/fsl_qe_udc.c | |
parent | 28541d0f1894cd0c8f4a90c6e006c88d38ad3ac0 (diff) |
dt/usb: Eliminate users of of_platform_{,un}register_driver
Get rid of users of of_platform_driver in drivers/usb. The
of_platform_{,un}register_driver functions are going away, so the
users need to be converted to using the platform_bus_type directly.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/usb/gadget/fsl_qe_udc.c')
-rw-r--r-- | drivers/usb/gadget/fsl_qe_udc.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c index 792d5ef40137..aee7e3c53c38 100644 --- a/drivers/usb/gadget/fsl_qe_udc.c +++ b/drivers/usb/gadget/fsl_qe_udc.c | |||
@@ -2523,8 +2523,7 @@ static void qe_udc_release(struct device *dev) | |||
2523 | } | 2523 | } |
2524 | 2524 | ||
2525 | /* Driver probe functions */ | 2525 | /* Driver probe functions */ |
2526 | static int __devinit qe_udc_probe(struct platform_device *ofdev, | 2526 | static int __devinit qe_udc_probe(struct platform_device *ofdev) |
2527 | const struct of_device_id *match) | ||
2528 | { | 2527 | { |
2529 | struct device_node *np = ofdev->dev.of_node; | 2528 | struct device_node *np = ofdev->dev.of_node; |
2530 | struct qe_ep *ep; | 2529 | struct qe_ep *ep; |
@@ -2532,6 +2531,9 @@ static int __devinit qe_udc_probe(struct platform_device *ofdev, | |||
2532 | unsigned int i; | 2531 | unsigned int i; |
2533 | const void *prop; | 2532 | const void *prop; |
2534 | 2533 | ||
2534 | if (!ofdev->dev.of_match) | ||
2535 | return -EINVAL; | ||
2536 | |||
2535 | prop = of_get_property(np, "mode", NULL); | 2537 | prop = of_get_property(np, "mode", NULL); |
2536 | if (!prop || strcmp(prop, "peripheral")) | 2538 | if (!prop || strcmp(prop, "peripheral")) |
2537 | return -ENODEV; | 2539 | return -ENODEV; |
@@ -2543,7 +2545,7 @@ static int __devinit qe_udc_probe(struct platform_device *ofdev, | |||
2543 | return -ENOMEM; | 2545 | return -ENOMEM; |
2544 | } | 2546 | } |
2545 | 2547 | ||
2546 | udc_controller->soc_type = (unsigned long)match->data; | 2548 | udc_controller->soc_type = (unsigned long)ofdev->dev.of_match->data; |
2547 | udc_controller->usb_regs = of_iomap(np, 0); | 2549 | udc_controller->usb_regs = of_iomap(np, 0); |
2548 | if (!udc_controller->usb_regs) { | 2550 | if (!udc_controller->usb_regs) { |
2549 | ret = -ENOMEM; | 2551 | ret = -ENOMEM; |
@@ -2768,7 +2770,7 @@ static const struct of_device_id qe_udc_match[] __devinitconst = { | |||
2768 | 2770 | ||
2769 | MODULE_DEVICE_TABLE(of, qe_udc_match); | 2771 | MODULE_DEVICE_TABLE(of, qe_udc_match); |
2770 | 2772 | ||
2771 | static struct of_platform_driver udc_driver = { | 2773 | static struct platform_driver udc_driver = { |
2772 | .driver = { | 2774 | .driver = { |
2773 | .name = (char *)driver_name, | 2775 | .name = (char *)driver_name, |
2774 | .owner = THIS_MODULE, | 2776 | .owner = THIS_MODULE, |
@@ -2786,12 +2788,12 @@ static int __init qe_udc_init(void) | |||
2786 | { | 2788 | { |
2787 | printk(KERN_INFO "%s: %s, %s\n", driver_name, driver_desc, | 2789 | printk(KERN_INFO "%s: %s, %s\n", driver_name, driver_desc, |
2788 | DRIVER_VERSION); | 2790 | DRIVER_VERSION); |
2789 | return of_register_platform_driver(&udc_driver); | 2791 | return platform_driver_register(&udc_driver); |
2790 | } | 2792 | } |
2791 | 2793 | ||
2792 | static void __exit qe_udc_exit(void) | 2794 | static void __exit qe_udc_exit(void) |
2793 | { | 2795 | { |
2794 | of_unregister_platform_driver(&udc_driver); | 2796 | platform_driver_unregister(&udc_driver); |
2795 | } | 2797 | } |
2796 | 2798 | ||
2797 | module_init(qe_udc_init); | 2799 | module_init(qe_udc_init); |