summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-06-13 18:59:51 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-18 00:45:46 +0400
commit05f6353b830768d2f3ac34005975e78b4dc7ec45 (patch)
tree15b0ea8854d45a43f82138bb8abb157ad70ced98 /drivers/usb/chipidea
parent785dabef0cc34d169edf43b5af35a6e5f3f87fd4 (diff)
downloadlinux-05f6353b830768d2f3ac34005975e78b4dc7ec45.tar.xz
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: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r--drivers/usb/chipidea/ci13xxx_imx.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c
index 5fac2a1b53e3..9cecfd517b78 100644
--- a/drivers/usb/chipidea/ci13xxx_imx.c
+++ b/drivers/usb/chipidea/ci13xxx_imx.c
@@ -99,7 +99,6 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
{
struct ci13xxx_imx_data *data;
struct platform_device *phy_pdev;
- struct device_node *phy_np;
struct resource *res;
int ret;
@@ -133,10 +132,9 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
return ret;
}
- phy_np = of_parse_phandle(pdev->dev.of_node, "fsl,usbphy", 0);
- if (phy_np) {
- data->phy_np = phy_np;
- phy_pdev = of_find_device_by_node(phy_np);
+ data->phy_np = of_parse_phandle(pdev->dev.of_node, "fsl,usbphy", 0);
+ if (data->phy_np) {
+ phy_pdev = of_find_device_by_node(data->phy_np);
if (phy_pdev) {
struct usb_phy *phy;
phy = pdev_to_phy(phy_pdev);
@@ -211,8 +209,8 @@ err:
if (data->reg_vbus)
regulator_disable(data->reg_vbus);
put_np:
- if (phy_np)
- of_node_put(phy_np);
+ if (data->phy_np)
+ of_node_put(data->phy_np);
clk_disable_unprepare(data->clk);
return ret;
}