Commit 05f6353b authored by Fabio Estevam's avatar Fabio Estevam Committed by Greg Kroah-Hartman

usb: chipidea: ci13xxx_imx: remove 'phy_np'

There is no need to keep a local 'phy_np' as we can directly use the private
structure in data->phy_np.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 785dabef
...@@ -99,7 +99,6 @@ static int ci13xxx_imx_probe(struct platform_device *pdev) ...@@ -99,7 +99,6 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
{ {
struct ci13xxx_imx_data *data; struct ci13xxx_imx_data *data;
struct platform_device *phy_pdev; struct platform_device *phy_pdev;
struct device_node *phy_np;
struct resource *res; struct resource *res;
int ret; int ret;
...@@ -133,10 +132,9 @@ static int ci13xxx_imx_probe(struct platform_device *pdev) ...@@ -133,10 +132,9 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
return ret; return ret;
} }
phy_np = of_parse_phandle(pdev->dev.of_node, "fsl,usbphy", 0); data->phy_np = of_parse_phandle(pdev->dev.of_node, "fsl,usbphy", 0);
if (phy_np) { if (data->phy_np) {
data->phy_np = phy_np; phy_pdev = of_find_device_by_node(data->phy_np);
phy_pdev = of_find_device_by_node(phy_np);
if (phy_pdev) { if (phy_pdev) {
struct usb_phy *phy; struct usb_phy *phy;
phy = pdev_to_phy(phy_pdev); phy = pdev_to_phy(phy_pdev);
...@@ -211,8 +209,8 @@ static int ci13xxx_imx_probe(struct platform_device *pdev) ...@@ -211,8 +209,8 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
if (data->reg_vbus) if (data->reg_vbus)
regulator_disable(data->reg_vbus); regulator_disable(data->reg_vbus);
put_np: put_np:
if (phy_np) if (data->phy_np)
of_node_put(phy_np); of_node_put(data->phy_np);
clk_disable_unprepare(data->clk); clk_disable_unprepare(data->clk);
return ret; return ret;
} }
......
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