diff options
author | Felipe Balbi <balbi@ti.com> | 2012-02-29 09:46:23 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-01 12:31:22 -0500 |
commit | cd70469d084fde198dc07c1a31b8463562228a5a (patch) | |
tree | 166cf8dc555922a43abb71aa681e56dc3e61c776 /drivers/usb/core/hcd.c | |
parent | 444aa7fa9bd752d19ce472d3e02558b987c3cc67 (diff) |
usb: core: hcd: make hcd->irq unsigned
There's really no point in having hcd->irq as a
signed integer when we consider the fact that
IRQ 0 means NO_IRQ. In order to avoid confusion,
make hcd->irq unsigned and fix users who were
passing -1 as the IRQ number to usb_add_hcd.
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/hcd.c')
-rw-r--r-- | drivers/usb/core/hcd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index e1282328fc2..9d7fc9a3993 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -2352,7 +2352,7 @@ static int usb_hcd_request_irqs(struct usb_hcd *hcd, | |||
2352 | "io mem" : "io base", | 2352 | "io mem" : "io base", |
2353 | (unsigned long long)hcd->rsrc_start); | 2353 | (unsigned long long)hcd->rsrc_start); |
2354 | } else { | 2354 | } else { |
2355 | hcd->irq = -1; | 2355 | hcd->irq = 0; |
2356 | if (hcd->rsrc_start) | 2356 | if (hcd->rsrc_start) |
2357 | dev_info(hcd->self.controller, "%s 0x%08llx\n", | 2357 | dev_info(hcd->self.controller, "%s 0x%08llx\n", |
2358 | (hcd->driver->flags & HCD_MEMORY) ? | 2358 | (hcd->driver->flags & HCD_MEMORY) ? |
@@ -2508,7 +2508,7 @@ err_register_root_hub: | |||
2508 | clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); | 2508 | clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); |
2509 | del_timer_sync(&hcd->rh_timer); | 2509 | del_timer_sync(&hcd->rh_timer); |
2510 | err_hcd_driver_start: | 2510 | err_hcd_driver_start: |
2511 | if (usb_hcd_is_primary_hcd(hcd) && hcd->irq >= 0) | 2511 | if (usb_hcd_is_primary_hcd(hcd) && hcd->irq > 0) |
2512 | free_irq(irqnum, hcd); | 2512 | free_irq(irqnum, hcd); |
2513 | err_request_irq: | 2513 | err_request_irq: |
2514 | err_hcd_driver_setup: | 2514 | err_hcd_driver_setup: |
@@ -2573,7 +2573,7 @@ void usb_remove_hcd(struct usb_hcd *hcd) | |||
2573 | del_timer_sync(&hcd->rh_timer); | 2573 | del_timer_sync(&hcd->rh_timer); |
2574 | 2574 | ||
2575 | if (usb_hcd_is_primary_hcd(hcd)) { | 2575 | if (usb_hcd_is_primary_hcd(hcd)) { |
2576 | if (hcd->irq >= 0) | 2576 | if (hcd->irq > 0) |
2577 | free_irq(hcd->irq, hcd); | 2577 | free_irq(hcd->irq, hcd); |
2578 | } | 2578 | } |
2579 | 2579 | ||