summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/udc/at91_udc.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2015-01-14 19:22:00 +0300
committerNicolas Ferre <nicolas.ferre@atmel.com>2015-01-15 16:52:06 +0300
commit9f00fc1dae4a2c909b970f07d17ef649f72873fe (patch)
treef31b672d56cacd5b725cbe2255b15ac96b8ecaee /drivers/usb/gadget/udc/at91_udc.c
parent31b817bc82f5f2c22d96bba719183ec6879f85b9 (diff)
downloadlinux-9f00fc1dae4a2c909b970f07d17ef649f72873fe.tar.xz
usb: gadget: at91_udc: Remove non-DT handling code
Since non-DT board support has been removed from the at91 architecture we can safely remove non-DT handling code. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'drivers/usb/gadget/udc/at91_udc.c')
-rw-r--r--drivers/usb/gadget/udc/at91_udc.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/usb/gadget/udc/at91_udc.c b/drivers/usb/gadget/udc/at91_udc.c
index d33f2994b7c4..be7e16037ac4 100644
--- a/drivers/usb/gadget/udc/at91_udc.c
+++ b/drivers/usb/gadget/udc/at91_udc.c
@@ -1710,12 +1710,6 @@ static int at91udc_probe(struct platform_device *pdev)
int retval;
struct resource *res;
- if (!dev_get_platdata(dev) && !pdev->dev.of_node) {
- /* small (so we copy it) but critical! */
- DBG("missing platform_data\n");
- return -ENODEV;
- }
-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -ENXIO;
@@ -1728,11 +1722,7 @@ static int at91udc_probe(struct platform_device *pdev)
/* init software state */
udc = &controller;
udc->gadget.dev.parent = dev;
- if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node)
- at91udc_of_init(udc, pdev->dev.of_node);
- else
- memcpy(&udc->board, dev_get_platdata(dev),
- sizeof(struct at91_udc_data));
+ at91udc_of_init(udc, pdev->dev.of_node);
udc->pdev = pdev;
udc->enabled = 0;
spin_lock_init(&udc->lock);
@@ -1968,14 +1958,12 @@ static int at91udc_resume(struct platform_device *pdev)
#define at91udc_resume NULL
#endif
-#if defined(CONFIG_OF)
static const struct of_device_id at91_udc_dt_ids[] = {
{ .compatible = "atmel,at91rm9200-udc" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, at91_udc_dt_ids);
-#endif
static struct platform_driver at91_udc_driver = {
.remove = __exit_p(at91udc_remove),
@@ -1984,7 +1972,7 @@ static struct platform_driver at91_udc_driver = {
.resume = at91udc_resume,
.driver = {
.name = (char *) driver_name,
- .of_match_table = of_match_ptr(at91_udc_dt_ids),
+ .of_match_table = at91_udc_dt_ids,
},
};