diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-07-02 07:08:33 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-07-02 07:08:46 +0200 |
commit | 8afe2cb4d4af5b472adeac9132200dc8c9100821 (patch) | |
tree | b6164ed60137b82e6e820a329999f4f0f515bd84 /drivers/usb/imx/chipidea-imx.c | |
parent | 12657cb99e1ca670da6a7cace3b238a42003e629 (diff) | |
parent | fff76d57d2670a8f15c875355fb840665ebf8a3e (diff) | |
download | barebox-8afe2cb4d4af5b472adeac9132200dc8c9100821.tar.gz barebox-8afe2cb4d4af5b472adeac9132200dc8c9100821.tar.xz |
Merge branch 'for-next-manual/oftree-linux-sync'
Diffstat (limited to 'drivers/usb/imx/chipidea-imx.c')
-rw-r--r-- | drivers/usb/imx/chipidea-imx.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/imx/chipidea-imx.c b/drivers/usb/imx/chipidea-imx.c index 80a51b72e8..a0dab70337 100644 --- a/drivers/usb/imx/chipidea-imx.c +++ b/drivers/usb/imx/chipidea-imx.c @@ -76,16 +76,15 @@ static int imx_chipidea_port_post_init(void *drvdata) static int imx_chipidea_probe_dt(struct imx_chipidea *ci) { - const void *out_args; - struct device_node *usbmisc_np; + struct of_phandle_args out_args; enum usb_dr_mode mode; enum usb_phy_interface phymode; - of_parse_phandles_with_args(ci->dev->device_node, "fsl,usbmisc", - "#index-cells", 0, &usbmisc_np, &out_args); - - ci->portno = be32_to_cpup(out_args); + if (of_parse_phandle_with_args(ci->dev->device_node, "fsl,usbmisc", + "#index-cells", 0, &out_args)) + return -ENODEV; + ci->portno = out_args.args[0]; ci->flags = MXC_EHCI_MODE_UTMI_8BIT; mode = of_usb_get_dr_mode(ci->dev->device_node, NULL); @@ -122,7 +121,8 @@ static int imx_chipidea_probe_dt(struct imx_chipidea *ci) return -EINVAL; } - if (of_find_property(ci->dev->device_node, "disable-over-current")) + if (of_find_property(ci->dev->device_node, + "disable-over-current", NULL)) ci->flags |= MXC_EHCI_DISABLE_OVERCURRENT; return 0; |