In some cases the irq may not be requested by usb_add_hcd. E.g. the
interrupt is shared among different parts of the same driver, and by
having only 1 handler which calls the others, helps in making the
driver cleaner.
By exporting usb_hcd_irq, the driver can call the irq handler at the
correct time, without duplicating any code (otherwise, the
functionality of ush_hcd_irq had to be duplicated).
Signed-off-by: Jan Veldeman <[EMAIL PROTECTED]>
---
drivers/usb/core/hcd.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
07819cd839741df427b89be431d13035325b2790
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index fbd938d..83872cc 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1673,6 +1673,7 @@ irqreturn_t usb_hcd_irq (int irq, void *
usb_hc_died (hcd);
return IRQ_HANDLED;
}
+EXPORT_SYMBOL_GPL (usb_hcd_irq);
/*-------------------------------------------------------------------------*/
@@ -1773,6 +1774,9 @@ EXPORT_SYMBOL (usb_put_hcd);
* Finish the remaining parts of generic HCD initialization: allocate the
* buffers of consistent memory, register the bus, request the IRQ line,
* and call the driver's reset() and start() routines.
+ *
+ * If irqnum is 0, the irq will not be requested. The caller is
+ * responsible to call usb_hcd_irq at the correct time.
*/
int usb_add_hcd(struct usb_hcd *hcd,
unsigned int irqnum, unsigned long irqflags)
@@ -1826,7 +1830,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
dev_dbg(hcd->self.controller, "supports USB remote wakeup\n");
/* enable irqs just before we start the controller */
- if (hcd->driver->irq) {
+ if (hcd->driver->irq && irqnum) {
char buf[8], *bufp = buf;
#ifdef __sparc__
--
1.2.4
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel