diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 03:28:10 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 03:28:10 +0300 |
commit | 4c5811bf463b0ef82fabbd1708f8bb2d753aeb18 (patch) | |
tree | ff37d31217c3804ca05de21a55a9b5ca1ca818b2 /drivers/usb/gadget | |
parent | f74b9444192c60603020c61d7915b72893137edc (diff) | |
parent | 9f15444fefdb33509132ff5c9be60cb315c44cb2 (diff) | |
download | linux-4c5811bf463b0ef82fabbd1708f8bb2d753aeb18.tar.xz |
Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: (21 commits)
tty: serial: altera_jtaguart: Add device tree support
tty: serial: altera_uart: Add devicetree support
dt: eliminate of_platform_driver shim code
dt: Eliminate of_platform_{,un}register_driver
dt/serial: Eliminate users of of_platform_{,un}register_driver
dt/usb: Eliminate users of of_platform_{,un}register_driver
dt/video: Eliminate users of of_platform_{,un}register_driver
dt/net: Eliminate users of of_platform_{,un}register_driver
dt/sound: Eliminate users of of_platform_{,un}register_driver
dt/spi: Eliminate users of of_platform_{,un}register_driver
dt: uartlite: merge platform and of_platform driver bindings
dt: xilinx_hwicap: merge platform and of_platform driver bindings
ipmi: convert OF driver to platform driver
leds/leds-gpio: merge platform_driver with of_platform_driver
dt/sparc: Eliminate users of of_platform_{,un}register_driver
dt/powerpc: Eliminate users of of_platform_{,un}register_driver
dt/powerpc: move of_bus_type infrastructure to ibmebus
drivercore/dt: add a match table pointer to struct device
dt: Typo fix.
altera_ps2: Add devicetree support
...
Diffstat (limited to 'drivers/usb/gadget')
-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) } /* Driver probe functions */ -static int __devinit qe_udc_probe(struct platform_device *ofdev, - const struct of_device_id *match) +static int __devinit qe_udc_probe(struct platform_device *ofdev) { struct device_node *np = ofdev->dev.of_node; struct qe_ep *ep; @@ -2532,6 +2531,9 @@ static int __devinit qe_udc_probe(struct platform_device *ofdev, unsigned int i; const void *prop; + if (!ofdev->dev.of_match) + return -EINVAL; + prop = of_get_property(np, "mode", NULL); if (!prop || strcmp(prop, "peripheral")) return -ENODEV; @@ -2543,7 +2545,7 @@ static int __devinit qe_udc_probe(struct platform_device *ofdev, return -ENOMEM; } - udc_controller->soc_type = (unsigned long)match->data; + udc_controller->soc_type = (unsigned long)ofdev->dev.of_match->data; udc_controller->usb_regs = of_iomap(np, 0); if (!udc_controller->usb_regs) { ret = -ENOMEM; @@ -2768,7 +2770,7 @@ static const struct of_device_id qe_udc_match[] __devinitconst = { MODULE_DEVICE_TABLE(of, qe_udc_match); -static struct of_platform_driver udc_driver = { +static struct platform_driver udc_driver = { .driver = { .name = (char *)driver_name, .owner = THIS_MODULE, @@ -2786,12 +2788,12 @@ static int __init qe_udc_init(void) { printk(KERN_INFO "%s: %s, %s\n", driver_name, driver_desc, DRIVER_VERSION); - return of_register_platform_driver(&udc_driver); + return platform_driver_register(&udc_driver); } static void __exit qe_udc_exit(void) { - of_unregister_platform_driver(&udc_driver); + platform_driver_unregister(&udc_driver); } module_init(qe_udc_init); |