From: Shinya Kuribayashi Date: Thu, 17 May 2012 11:09:32 +0000 (+0900) Subject: USB: gpio_vbus: use cached IRQ number for consistency with the probed one X-Git-Tag: v3.5-rc1~149^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=123bbceebeb1174e385eab1fc2b2535dcdcc9ec3;p=pandora-kernel.git 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-diff-tree failed