> From: Milan Svoboda <[EMAIL PROTECTED]>
>
> Hi,
> I'm resending this patch because I didn't get any response...
>
> pxa2xx_udc driver uses define for irq number. This patch turns it
> to use platform resource. This allows both pxa and ixp4xx to use this
> driver flawlessly. Only irq numbers specific to lubbock platform are
> still defined via defines, but these are protected with ifdefs...
>
Oups, this one was bogus, ignore it please. I'm appending correct
version against 2.6.18-rc4.
Signed-off-by: Milan Svoboda <[EMAIL PROTECTED]>
---
diff -uprN -X orig/Documentation/dontdiff
orig.bak/drivers/usb/gadget/pxa2xx_udc.c
orig/drivers/usb/gadget/pxa2xx_udc.c
--- orig.bak/drivers/usb/gadget/pxa2xx_udc.c 2006-05-30
10:38:49.000000000 +0000
+++ orig/drivers/usb/gadget/pxa2xx_udc.c 2006-05-30
10:45:51.000000000 +0000
@@ -2438,6 +2438,7 @@ static struct pxa2xx_udc memory = {
static int __init pxa2xx_udc_probe(struct platform_device *pdev)
{
struct pxa2xx_udc *dev = &memory;
+ struct resource *irq_res;
int retval, out_dma = 1;
u32 chiprev;
@@ -2480,7 +2481,11 @@ static int __init pxa2xx_udc_probe(struc
return -ENODEV;
}
- pr_debug("%s: IRQ %d%s%s%s\n", driver_name, IRQ_USB,
+ irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+ if (!irq_res)
+ return -ENODEV;
+
+ pr_debug("%s: IRQ %d%s%s%s\n", driver_name, irq_res->start,
dev->has_cfr ? "" : " (!cfr)",
out_dma ? "" : " (broken dma-out)",
SIZE_STR DMASTR
@@ -2520,11 +2525,11 @@ static int __init pxa2xx_udc_probe(struc
dev->vbus = is_vbus_present();
/* irq setup after old hardware state is cleaned up */
- retval = request_irq(IRQ_USB, pxa2xx_udc_irq,
+ retval = request_irq(irq_res->start, pxa2xx_udc_irq,
IRQF_DISABLED, driver_name, dev);
if (retval != 0) {
- printk(KERN_ERR "%s: can't get irq %i, err %d\n",
- driver_name, IRQ_USB, retval);
+ printk(KERN_ERR "%s: can't get irq %ld, err %d\n",
+ driver_name, irq_res->start, retval);
return -EBUSY;
}
dev->got_irq = 1;
@@ -2539,7 +2544,7 @@ static int __init pxa2xx_udc_probe(struc
printk(KERN_ERR "%s: can't get irq %i, err %d\n",
driver_name, LUBBOCK_USB_DISC_IRQ,
retval);
lubbock_fail0:
- free_irq(IRQ_USB, dev);
+ free_irq(irq_res->start, dev);
return -EBUSY;
}
retval = request_irq(LUBBOCK_USB_IRQ,
@@ -2572,13 +2577,15 @@ static void pxa2xx_udc_shutdown(struct p
static int __exit pxa2xx_udc_remove(struct platform_device *pdev)
{
struct pxa2xx_udc *dev = platform_get_drvdata(pdev);
+ struct resource *irq_res;
udc_disable(dev);
remove_proc_files();
usb_gadget_unregister_driver(dev->driver);
if (dev->got_irq) {
- free_irq(IRQ_USB, dev);
+ irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+ free_irq(irq_res->start, dev);
dev->got_irq = 0;
}
#ifdef CONFIG_ARCH_LUBBOCK
-------------------------------------------------------------------------
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