Commit 9477ab2b authored by Hans-Christian Egtvedt's avatar Hans-Christian Egtvedt Committed by Haavard Skinnemoen

avr32: use gpio_is_valid() to check USBA vbus_pin I/O line

This patch will use gpio_is_valid() to check the vbus_pin I/O line.
Signed-off-by: default avatarHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: default avatarHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
parent 472a6786
...@@ -1753,7 +1753,7 @@ at32_add_device_usba(unsigned int id, struct usba_platform_data *data) ...@@ -1753,7 +1753,7 @@ at32_add_device_usba(unsigned int id, struct usba_platform_data *data)
if (platform_device_add_data(pdev, data, sizeof(usba_data))) if (platform_device_add_data(pdev, data, sizeof(usba_data)))
goto out_free_pdev; goto out_free_pdev;
if (data->vbus_pin >= 0) if (gpio_is_valid(data->vbus_pin))
at32_select_gpio(data->vbus_pin, 0); at32_select_gpio(data->vbus_pin, 0);
usba0_pclk.dev = &pdev->dev; usba0_pclk.dev = &pdev->dev;
......
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