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/host/xhci.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/host/xhci.c')
-rw-r--r-- | drivers/usb/host/xhci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index c939f5fdef9..a629ad86032 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -224,13 +224,13 @@ static void xhci_free_irq(struct xhci_hcd *xhci) | |||
224 | int ret; | 224 | int ret; |
225 | 225 | ||
226 | /* return if using legacy interrupt */ | 226 | /* return if using legacy interrupt */ |
227 | if (xhci_to_hcd(xhci)->irq >= 0) | 227 | if (xhci_to_hcd(xhci)->irq > 0) |
228 | return; | 228 | return; |
229 | 229 | ||
230 | ret = xhci_free_msi(xhci); | 230 | ret = xhci_free_msi(xhci); |
231 | if (!ret) | 231 | if (!ret) |
232 | return; | 232 | return; |
233 | if (pdev->irq >= 0) | 233 | if (pdev->irq > 0) |
234 | free_irq(pdev->irq, xhci_to_hcd(xhci)); | 234 | free_irq(pdev->irq, xhci_to_hcd(xhci)); |
235 | 235 | ||
236 | return; | 236 | return; |
@@ -341,7 +341,7 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd) | |||
341 | /* unregister the legacy interrupt */ | 341 | /* unregister the legacy interrupt */ |
342 | if (hcd->irq) | 342 | if (hcd->irq) |
343 | free_irq(hcd->irq, hcd); | 343 | free_irq(hcd->irq, hcd); |
344 | hcd->irq = -1; | 344 | hcd->irq = 0; |
345 | 345 | ||
346 | ret = xhci_setup_msix(xhci); | 346 | ret = xhci_setup_msix(xhci); |
347 | if (ret) | 347 | if (ret) |
@@ -349,7 +349,7 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd) | |||
349 | ret = xhci_setup_msi(xhci); | 349 | ret = xhci_setup_msi(xhci); |
350 | 350 | ||
351 | if (!ret) | 351 | if (!ret) |
352 | /* hcd->irq is -1, we have MSI */ | 352 | /* hcd->irq is 0, we have MSI */ |
353 | return 0; | 353 | return 0; |
354 | 354 | ||
355 | if (!pdev->irq) { | 355 | if (!pdev->irq) { |