Commit 71f4b9cd authored by Jingoo Han's avatar Jingoo Han Committed by Samuel Ortiz

mfd: omap-usb-host: Use devm_gpio_request_one()

Use devm_gpio_request_one() to make cleanup paths more simple.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 54d34920
...@@ -437,11 +437,11 @@ static void omap_usbhs_init(struct device *dev) ...@@ -437,11 +437,11 @@ static void omap_usbhs_init(struct device *dev)
if (pdata->phy_reset) { if (pdata->phy_reset) {
if (gpio_is_valid(pdata->reset_gpio_port[0])) if (gpio_is_valid(pdata->reset_gpio_port[0]))
gpio_request_one(pdata->reset_gpio_port[0], devm_gpio_request_one(dev, pdata->reset_gpio_port[0],
GPIOF_OUT_INIT_LOW, "USB1 PHY reset"); GPIOF_OUT_INIT_LOW, "USB1 PHY reset");
if (gpio_is_valid(pdata->reset_gpio_port[1])) if (gpio_is_valid(pdata->reset_gpio_port[1]))
gpio_request_one(pdata->reset_gpio_port[1], devm_gpio_request_one(dev, pdata->reset_gpio_port[1],
GPIOF_OUT_INIT_LOW, "USB2 PHY reset"); GPIOF_OUT_INIT_LOW, "USB2 PHY reset");
/* Hold the PHY in RESET for enough time till DIR is high */ /* Hold the PHY in RESET for enough time till DIR is high */
...@@ -492,21 +492,6 @@ static void omap_usbhs_init(struct device *dev) ...@@ -492,21 +492,6 @@ static void omap_usbhs_init(struct device *dev)
} }
} }
static void omap_usbhs_deinit(struct device *dev)
{
struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
struct usbhs_omap_platform_data *pdata = omap->pdata;
if (pdata->phy_reset) {
if (gpio_is_valid(pdata->reset_gpio_port[0]))
gpio_free(pdata->reset_gpio_port[0]);
if (gpio_is_valid(pdata->reset_gpio_port[1]))
gpio_free(pdata->reset_gpio_port[1]);
}
}
/** /**
* usbhs_omap_probe - initialize TI-based HCDs * usbhs_omap_probe - initialize TI-based HCDs
* *
...@@ -709,8 +694,6 @@ static int usbhs_omap_probe(struct platform_device *pdev) ...@@ -709,8 +694,6 @@ static int usbhs_omap_probe(struct platform_device *pdev)
return 0; return 0;
err_alloc: err_alloc:
omap_usbhs_deinit(&pdev->dev);
for (i = 0; i < omap->nports; i++) { for (i = 0; i < omap->nports; i++) {
if (!IS_ERR(omap->utmi_clk[i])) if (!IS_ERR(omap->utmi_clk[i]))
clk_put(omap->utmi_clk[i]); clk_put(omap->utmi_clk[i]);
...@@ -755,8 +738,6 @@ static int usbhs_omap_remove(struct platform_device *pdev) ...@@ -755,8 +738,6 @@ static int usbhs_omap_remove(struct platform_device *pdev)
struct usbhs_hcd_omap *omap = platform_get_drvdata(pdev); struct usbhs_hcd_omap *omap = platform_get_drvdata(pdev);
int i; int i;
omap_usbhs_deinit(&pdev->dev);
for (i = 0; i < omap->nports; i++) { for (i = 0; i < omap->nports; i++) {
if (!IS_ERR(omap->utmi_clk[i])) if (!IS_ERR(omap->utmi_clk[i]))
clk_put(omap->utmi_clk[i]); clk_put(omap->utmi_clk[i]);
......
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