Commit bd73bfcd authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Greg Kroah-Hartman

USB: host: ohci-at91: merge ohci_at91_of_init in ohci_hcd_at91_drv_probe

As device tree support is now mandatory, merge ohci_at91_of_init() in
ohci_hcd_at91_drv_probe().
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent be12be54
......@@ -449,17 +449,18 @@ static const struct of_device_id at91_ohci_dt_ids[] = {
MODULE_DEVICE_TABLE(of, at91_ohci_dt_ids);
static int ohci_at91_of_init(struct platform_device *pdev)
/*-------------------------------------------------------------------------*/
static int ohci_hcd_at91_drv_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
int i, gpio, ret;
enum of_gpio_flags flags;
struct at91_usbh_data *pdata;
int i;
int gpio;
int ret;
enum of_gpio_flags flags;
u32 ports;
if (!np)
return 0;
/* Right now device-tree probed devices don't get dma_mask set.
* Since shared usb code relies on it, set it here for now.
* Once we have dma capability bindings this can go away.
......@@ -489,25 +490,6 @@ static int ohci_at91_of_init(struct platform_device *pdev)
pdev->dev.platform_data = pdata;
return 0;
}
/*-------------------------------------------------------------------------*/
static int ohci_hcd_at91_drv_probe(struct platform_device *pdev)
{
struct at91_usbh_data *pdata;
int i;
int gpio;
int ret;
ret = ohci_at91_of_init(pdev);
if (ret)
return ret;
pdata = dev_get_platdata(&pdev->dev);
if (pdata) {
at91_for_each_port(i) {
/*
* do not configure PIO if not in relation with
......@@ -573,7 +555,6 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev)
"can't get gpio IRQ for overcurrent\n");
}
}
}
device_init_wakeup(&pdev->dev, 1);
return usb_hcd_at91_probe(&ohci_at91_hc_driver, pdev);
......
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