Commit 9f00fc1d authored by Boris Brezillon's avatar Boris Brezillon Committed by Nicolas Ferre

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: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
parent 31b817bc
...@@ -32,6 +32,7 @@ menu "USB Peripheral Controller" ...@@ -32,6 +32,7 @@ menu "USB Peripheral Controller"
config USB_AT91 config USB_AT91
tristate "Atmel AT91 USB Device Port" tristate "Atmel AT91 USB Device Port"
depends on ARCH_AT91 depends on ARCH_AT91
depends on OF || COMPILE_TEST
help help
Many Atmel AT91 processors (such as the AT91RM2000) have a Many Atmel AT91 processors (such as the AT91RM2000) have a
full speed USB Device Port with support for five configurable full speed USB Device Port with support for five configurable
......
...@@ -1710,12 +1710,6 @@ static int at91udc_probe(struct platform_device *pdev) ...@@ -1710,12 +1710,6 @@ static int at91udc_probe(struct platform_device *pdev)
int retval; int retval;
struct resource *res; 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); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) if (!res)
return -ENXIO; return -ENXIO;
...@@ -1728,11 +1722,7 @@ static int at91udc_probe(struct platform_device *pdev) ...@@ -1728,11 +1722,7 @@ static int at91udc_probe(struct platform_device *pdev)
/* init software state */ /* init software state */
udc = &controller; udc = &controller;
udc->gadget.dev.parent = dev; udc->gadget.dev.parent = dev;
if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) at91udc_of_init(udc, 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));
udc->pdev = pdev; udc->pdev = pdev;
udc->enabled = 0; udc->enabled = 0;
spin_lock_init(&udc->lock); spin_lock_init(&udc->lock);
...@@ -1968,14 +1958,12 @@ static int at91udc_resume(struct platform_device *pdev) ...@@ -1968,14 +1958,12 @@ static int at91udc_resume(struct platform_device *pdev)
#define at91udc_resume NULL #define at91udc_resume NULL
#endif #endif
#if defined(CONFIG_OF)
static const struct of_device_id at91_udc_dt_ids[] = { static const struct of_device_id at91_udc_dt_ids[] = {
{ .compatible = "atmel,at91rm9200-udc" }, { .compatible = "atmel,at91rm9200-udc" },
{ /* sentinel */ } { /* sentinel */ }
}; };
MODULE_DEVICE_TABLE(of, at91_udc_dt_ids); MODULE_DEVICE_TABLE(of, at91_udc_dt_ids);
#endif
static struct platform_driver at91_udc_driver = { static struct platform_driver at91_udc_driver = {
.remove = __exit_p(at91udc_remove), .remove = __exit_p(at91udc_remove),
...@@ -1984,7 +1972,7 @@ static struct platform_driver at91_udc_driver = { ...@@ -1984,7 +1972,7 @@ static struct platform_driver at91_udc_driver = {
.resume = at91udc_resume, .resume = at91udc_resume,
.driver = { .driver = {
.name = (char *) driver_name, .name = (char *) driver_name,
.of_match_table = of_match_ptr(at91_udc_dt_ids), .of_match_table = at91_udc_dt_ids,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment