From e9213a75889889a5cdc58c6bd2b6836206f57c66 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Thu, 17 May 2012 20:09:32 +0900 Subject: [PATCH] --- yaml --- r: 303979 b: refs/heads/master c: 123bbceebeb1174e385eab1fc2b2535dcdcc9ec3 h: refs/heads/master i: 303977: 6e0453ffe4c35aac40a4d75216b96320705640be 303975: d9913a237e5ebc1c6c107c860afacc1f5c079411 v: v3 --- [refs] | 2 +- trunk/drivers/usb/otg/gpio_vbus.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 683e2851f6ee..235e24f75401 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8f9d973a0daee49e0b9b924c724b18b0170ec9cb +refs/heads/master: 123bbceebeb1174e385eab1fc2b2535dcdcc9ec3 diff --git a/trunk/drivers/usb/otg/gpio_vbus.c b/trunk/drivers/usb/otg/gpio_vbus.c index bd6e755dd3d8..8853cb1fd9d7 100644 --- a/trunk/drivers/usb/otg/gpio_vbus.c +++ b/trunk/drivers/usb/otg/gpio_vbus.c @@ -39,6 +39,7 @@ struct gpio_vbus_data { unsigned mA; struct delayed_work work; int vbus; + int irq; }; @@ -173,12 +174,11 @@ static int gpio_vbus_set_peripheral(struct usb_otg *otg, struct gpio_vbus_data *gpio_vbus; struct gpio_vbus_mach_info *pdata; struct platform_device *pdev; - int gpio, irq; + int gpio; gpio_vbus = container_of(otg->phy, struct gpio_vbus_data, phy); pdev = to_platform_device(gpio_vbus->dev); pdata = gpio_vbus->dev->platform_data; - irq = gpio_to_irq(pdata->gpio_vbus); gpio = pdata->gpio_pullup; if (!gadget) { @@ -203,7 +203,7 @@ static int gpio_vbus_set_peripheral(struct usb_otg *otg, /* initialize connection state */ gpio_vbus->vbus = 0; /* start with disconnected */ - gpio_vbus_irq(irq, pdev); + gpio_vbus_irq(gpio_vbus->irq, pdev); return 0; } @@ -284,6 +284,8 @@ static int __init gpio_vbus_probe(struct platform_device *pdev) } else irq = gpio_to_irq(gpio); + gpio_vbus->irq = irq; + /* if data line pullup is in use, initialize it to "not pulling up" */ gpio = pdata->gpio_pullup; if (gpio_is_valid(gpio)) { @@ -350,7 +352,7 @@ static int __exit gpio_vbus_remove(struct platform_device *pdev) usb_set_transceiver(NULL); - free_irq(gpio_to_irq(gpio), pdev); + free_irq(gpio_vbus->irq, pdev); if (gpio_is_valid(pdata->gpio_pullup)) gpio_free(pdata->gpio_pullup); gpio_free(gpio);