]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
avr32: use gpio_is_valid() to check USBA vbus_pin I/O line
authorHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Tue, 24 Mar 2009 14:45:21 +0000 (15:45 +0100)
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Thu, 26 Mar 2009 13:59:01 +0000 (14:59 +0100)
This patch will use gpio_is_valid() to check the vbus_pin I/O line.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
arch/avr32/mach-at32ap/at32ap700x.c

index 3fbfd1e32a9ee79af4f4545d95a9543b9070d189..402cae8f92051faff2e8b0a689a7dc23a9d35244 100644 (file)
@@ -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)))
                goto out_free_pdev;
 
-       if (data->vbus_pin >= 0)
+       if (gpio_is_valid(data->vbus_pin))
                at32_select_gpio(data->vbus_pin, 0);
 
        usba0_pclk.dev = &pdev->dev;