Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / drivers / usb / core / hcd.c
index fb4d058..e2e00ba 100644 (file)
@@ -22,6 +22,7 @@
  * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/version.h>
 #include <linux/kernel.h>
@@ -1825,16 +1826,24 @@ int usb_add_hcd(struct usb_hcd *hcd,
 
        /* enable irqs just before we start the controller */
        if (hcd->driver->irq) {
+               char    buf[8], *bufp = buf;
+
+#ifdef __sparc__
+               bufp = __irq_itoa(irqnum);
+#else
+               sprintf(buf, "%d", irqnum);
+#endif
+
                snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",
                                hcd->driver->description, hcd->self.busnum);
                if ((retval = request_irq(irqnum, &usb_hcd_irq, irqflags,
                                hcd->irq_descr, hcd)) != 0) {
                        dev_err(hcd->self.controller,
-                                       "request interrupt %d failed\n", irqnum);
+                                       "request interrupt %s failed\n", bufp);
                        goto err_request_irq;
                }
                hcd->irq = irqnum;
-               dev_info(hcd->self.controller, "irq %d, %s 0x%08llx\n", irqnum,
+               dev_info(hcd->self.controller, "irq %s, %s 0x%08llx\n", bufp,
                                (hcd->driver->flags & HCD_MEMORY) ?
                                        "io mem" : "io base",
                                        (unsigned long long)hcd->rsrc_start);