aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2006-06-20 04:21:29 -0400
committerDavid S. Miller <davem@davemloft.net>2006-06-20 04:21:29 -0400
commitc6387a48cf5958e43c201fc27a158c328927531a (patch)
treea6c24951d6c86ac47bd3f0ba198adbfffd03291b /drivers/usb
parent6a76267f0e52d920e6bb6da75541e6116d7304da (diff)
[SPARC]: Kill __irq_itoa().
This ugly hack was long overdue to die. It was a way to print out Sparc interrupts in a more freindly format, since IRQ numbers were arbitrary opaque 32-bit integers which vectored into PIL levels. These 32-bit integers were not necessarily in the 0-->NR_IRQS range, but the PILs they vectored to were. The idea now is that we will increase NR_IRQS a little bit and use a virtual<-->real IRQ number mapping scheme similar to PowerPC. That makes this IRQ printing hack irrelevant, and furthermore only a handful of drivers actually used __irq_itoa() making it even less useful. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/hcd.c12
-rw-r--r--drivers/usb/gadget/goku_udc.c11
-rw-r--r--drivers/usb/gadget/net2280.c14
3 files changed, 8 insertions, 29 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index e2e00ba4e1e6..4bf914d00a14 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1826,24 +1826,16 @@ int usb_add_hcd(struct usb_hcd *hcd,
1826 1826
1827 /* enable irqs just before we start the controller */ 1827 /* enable irqs just before we start the controller */
1828 if (hcd->driver->irq) { 1828 if (hcd->driver->irq) {
1829 char buf[8], *bufp = buf;
1830
1831#ifdef __sparc__
1832 bufp = __irq_itoa(irqnum);
1833#else
1834 sprintf(buf, "%d", irqnum);
1835#endif
1836
1837 snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d", 1829 snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",
1838 hcd->driver->description, hcd->self.busnum); 1830 hcd->driver->description, hcd->self.busnum);
1839 if ((retval = request_irq(irqnum, &usb_hcd_irq, irqflags, 1831 if ((retval = request_irq(irqnum, &usb_hcd_irq, irqflags,
1840 hcd->irq_descr, hcd)) != 0) { 1832 hcd->irq_descr, hcd)) != 0) {
1841 dev_err(hcd->self.controller, 1833 dev_err(hcd->self.controller,
1842 "request interrupt %s failed\n", bufp); 1834 "request interrupt %d failed\n", irqnum);
1843 goto err_request_irq; 1835 goto err_request_irq;
1844 } 1836 }
1845 hcd->irq = irqnum; 1837 hcd->irq = irqnum;
1846 dev_info(hcd->self.controller, "irq %s, %s 0x%08llx\n", bufp, 1838 dev_info(hcd->self.controller, "irq %d, %s 0x%08llx\n", irqnum,
1847 (hcd->driver->flags & HCD_MEMORY) ? 1839 (hcd->driver->flags & HCD_MEMORY) ?
1848 "io mem" : "io base", 1840 "io mem" : "io base",
1849 (unsigned long long)hcd->rsrc_start); 1841 (unsigned long long)hcd->rsrc_start);
diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c
index 66b81bbf6bee..5378c1757292 100644
--- a/drivers/usb/gadget/goku_udc.c
+++ b/drivers/usb/gadget/goku_udc.c
@@ -1850,7 +1850,6 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1850 unsigned long resource, len; 1850 unsigned long resource, len;
1851 void __iomem *base = NULL; 1851 void __iomem *base = NULL;
1852 int retval; 1852 int retval;
1853 char buf [8], *bufp;
1854 1853
1855 /* if you want to support more than one controller in a system, 1854 /* if you want to support more than one controller in a system,
1856 * usb_gadget_driver_{register,unregister}() must change. 1855 * usb_gadget_driver_{register,unregister}() must change.
@@ -1913,20 +1912,14 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1913 pci_set_drvdata(pdev, dev); 1912 pci_set_drvdata(pdev, dev);
1914 INFO(dev, "%s\n", driver_desc); 1913 INFO(dev, "%s\n", driver_desc);
1915 INFO(dev, "version: " DRIVER_VERSION " %s\n", dmastr()); 1914 INFO(dev, "version: " DRIVER_VERSION " %s\n", dmastr());
1916#ifndef __sparc__ 1915 INFO(dev, "irq %d, pci mem %p\n", pdev->irq, base);
1917 scnprintf(buf, sizeof buf, "%d", pdev->irq);
1918 bufp = buf;
1919#else
1920 bufp = __irq_itoa(pdev->irq);
1921#endif
1922 INFO(dev, "irq %s, pci mem %p\n", bufp, base);
1923 1916
1924 /* init to known state, then setup irqs */ 1917 /* init to known state, then setup irqs */
1925 udc_reset(dev); 1918 udc_reset(dev);
1926 udc_reinit (dev); 1919 udc_reinit (dev);
1927 if (request_irq(pdev->irq, goku_irq, SA_SHIRQ/*|SA_SAMPLE_RANDOM*/, 1920 if (request_irq(pdev->irq, goku_irq, SA_SHIRQ/*|SA_SAMPLE_RANDOM*/,
1928 driver_name, dev) != 0) { 1921 driver_name, dev) != 0) {
1929 DBG(dev, "request interrupt %s failed\n", bufp); 1922 DBG(dev, "request interrupt %d failed\n", pdev->irq);
1930 retval = -EBUSY; 1923 retval = -EBUSY;
1931 goto done; 1924 goto done;
1932 } 1925 }
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
index 0b9293493957..020d3c42b1af 100644
--- a/drivers/usb/gadget/net2280.c
+++ b/drivers/usb/gadget/net2280.c
@@ -2822,7 +2822,6 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
2822 unsigned long resource, len; 2822 unsigned long resource, len;
2823 void __iomem *base = NULL; 2823 void __iomem *base = NULL;
2824 int retval, i; 2824 int retval, i;
2825 char buf [8], *bufp;
2826 2825
2827 /* if you want to support more than one controller in a system, 2826 /* if you want to support more than one controller in a system,
2828 * usb_gadget_driver_{register,unregister}() must change. 2827 * usb_gadget_driver_{register,unregister}() must change.
@@ -2896,15 +2895,10 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
2896 retval = -ENODEV; 2895 retval = -ENODEV;
2897 goto done; 2896 goto done;
2898 } 2897 }
2899#ifndef __sparc__ 2898
2900 scnprintf (buf, sizeof buf, "%d", pdev->irq);
2901 bufp = buf;
2902#else
2903 bufp = __irq_itoa(pdev->irq);
2904#endif
2905 if (request_irq (pdev->irq, net2280_irq, SA_SHIRQ, driver_name, dev) 2899 if (request_irq (pdev->irq, net2280_irq, SA_SHIRQ, driver_name, dev)
2906 != 0) { 2900 != 0) {
2907 ERROR (dev, "request interrupt %s failed\n", bufp); 2901 ERROR (dev, "request interrupt %d failed\n", pdev->irq);
2908 retval = -EBUSY; 2902 retval = -EBUSY;
2909 goto done; 2903 goto done;
2910 } 2904 }
@@ -2953,8 +2947,8 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
2953 2947
2954 /* done */ 2948 /* done */
2955 INFO (dev, "%s\n", driver_desc); 2949 INFO (dev, "%s\n", driver_desc);
2956 INFO (dev, "irq %s, pci mem %p, chip rev %04x\n", 2950 INFO (dev, "irq %d, pci mem %p, chip rev %04x\n",
2957 bufp, base, dev->chiprev); 2951 pdev->irq, base, dev->chiprev);
2958 INFO (dev, "version: " DRIVER_VERSION "; dma %s\n", 2952 INFO (dev, "version: " DRIVER_VERSION "; dma %s\n",
2959 use_dma 2953 use_dma
2960 ? (use_dma_chaining ? "chaining" : "enabled") 2954 ? (use_dma_chaining ? "chaining" : "enabled")