From 123bbceebeb1174e385eab1fc2b2535dcdcc9ec3 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Thu, 17 May 2012 20:09:32 +0900 Subject: [PATCH] USB: gpio_vbus: use cached IRQ number for consistency with the probed one gpio_vbus is designed to be able to get an IRQ number for VBUS change interrupt either (1) through platform_get_resource(IORESOURCE_IRQ) or (2) by processing gpio_to_irq(pdata->gpio_vbus), in probe() function. On the other hand, gpio_vbus_set_peripheral() and gpio_vbus_remove() are always doing gpio_to_irq(pdata->gpio_vbus) to get an IRQ number. This is not just inconsistent, but also broken. There is no guarantee that an IRQ number obtained by platform_get_resource() is equal to gpio_to_irq(pdata->gpio_vbus). Cache an IRQ number in probe() function, and use it where necessary. Signed-off-by: Shinya Kuribayashi Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed