From 511ba46157d88ebb291233d1c4394568884327ae Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Fri, 14 Jun 2013 15:36:38 +0200 Subject: OF: base: import parse phandle functions from Linux OF API This imports of_parse_phandle_with_args and of_count_phandle_with_args from Linux OF API. The slightly different of_parse_phandles_with_args is removed and all users are converted to reflect the API change. Signed-off-by: Sebastian Hesselbarth --- drivers/usb/imx/chipidea-imx.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'drivers/usb/imx/chipidea-imx.c') diff --git a/drivers/usb/imx/chipidea-imx.c b/drivers/usb/imx/chipidea-imx.c index c552b4e324..20066499bf 100644 --- a/drivers/usb/imx/chipidea-imx.c +++ b/drivers/usb/imx/chipidea-imx.c @@ -62,16 +62,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); -- cgit v1.2.3