Skip to content

Commit

Permalink
atmel_usba_udc: Kill GPIO_PIN_NONE
Browse files Browse the repository at this point in the history
GPIO_PIN_NONE should no longer be used. Replace it with a simple
test against negative values.

This is a transitional patch, waiting for gpio_is_valid() to be
merged at which point the tests should be revisited.

Signed-off-by: Stelian Pop <[email protected]>
Acked-by: David Brownell <[email protected]>
Signed-off-by: Haavard Skinnemoen <[email protected]>
  • Loading branch information
stelian42 authored and Haavard Skinnemoen committed Apr 6, 2008
1 parent 7a24247 commit 8d12c32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/atmel_usba_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1937,7 +1937,7 @@ static int __init usba_udc_probe(struct platform_device *pdev)
goto err_device_add;
}

if (pdata && pdata->vbus_pin != GPIO_PIN_NONE) {
if (pdata && pdata->vbus_pin >= 0) {
if (!gpio_request(pdata->vbus_pin, "atmel_usba_udc")) {
udc->vbus_pin = pdata->vbus_pin;

Expand Down

0 comments on commit 8d12c32

Please sign in to comment.