arm: omap2plus: GPIO cleanup
use gpio_request_<one|array>() instead of multiple gpiolib calls, remove unneeded variables, etc. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
@@ -89,19 +89,13 @@ static void __init am3517_crane_init(void)
|
||||
return;
|
||||
}
|
||||
|
||||
ret = gpio_request(GPIO_USB_POWER, "usb_ehci_enable");
|
||||
ret = gpio_request_one(GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH,
|
||||
"usb_ehci_enable");
|
||||
if (ret < 0) {
|
||||
pr_err("Can not request GPIO %d\n", GPIO_USB_POWER);
|
||||
return;
|
||||
}
|
||||
|
||||
ret = gpio_direction_output(GPIO_USB_POWER, 1);
|
||||
if (ret < 0) {
|
||||
gpio_free(GPIO_USB_POWER);
|
||||
pr_err("Unable to initialize EHCI power\n");
|
||||
return;
|
||||
}
|
||||
|
||||
usbhs_init(&usbhs_bdata);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user