diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2013-06-13 10:59:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-17 16:45:46 -0400 |
commit | 05f6353b830768d2f3ac34005975e78b4dc7ec45 (patch) | |
tree | 15b0ea8854d45a43f82138bb8abb157ad70ced98 | |
parent | 785dabef0cc34d169edf43b5af35a6e5f3f87fd4 (diff) |
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>
-rw-r--r-- | drivers/usb/chipidea/ci13xxx_imx.c | 12 |
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) | |||
99 | { | 99 | { |
100 | struct ci13xxx_imx_data *data; | 100 | struct ci13xxx_imx_data *data; |
101 | struct platform_device *phy_pdev; | 101 | struct platform_device *phy_pdev; |
102 | struct device_node *phy_np; | ||
103 | struct resource *res; | 102 | struct resource *res; |
104 | int ret; | 103 | int ret; |
105 | 104 | ||
@@ -133,10 +132,9 @@ static int ci13xxx_imx_probe(struct platform_device *pdev) | |||
133 | return ret; | 132 | return ret; |
134 | } | 133 | } |
135 | 134 | ||
136 | phy_np = of_parse_phandle(pdev->dev.of_node, "fsl,usbphy", 0); | 135 | data->phy_np = of_parse_phandle(pdev->dev.of_node, "fsl,usbphy", 0); |
137 | if (phy_np) { | 136 | if (data->phy_np) { |
138 | data->phy_np = phy_np; | 137 | phy_pdev = of_find_device_by_node(data->phy_np); |
139 | phy_pdev = of_find_device_by_node(phy_np); | ||
140 | if (phy_pdev) { | 138 | if (phy_pdev) { |
141 | struct usb_phy *phy; | 139 | struct usb_phy *phy; |
142 | phy = pdev_to_phy(phy_pdev); | 140 | phy = pdev_to_phy(phy_pdev); |
@@ -211,8 +209,8 @@ err: | |||
211 | if (data->reg_vbus) | 209 | if (data->reg_vbus) |
212 | regulator_disable(data->reg_vbus); | 210 | regulator_disable(data->reg_vbus); |
213 | put_np: | 211 | put_np: |
214 | if (phy_np) | 212 | if (data->phy_np) |
215 | of_node_put(phy_np); | 213 | of_node_put(data->phy_np); |
216 | clk_disable_unprepare(data->clk); | 214 | clk_disable_unprepare(data->clk); |
217 | return ret; | 215 | return ret; |
218 | } | 216 | } |