diff options
Diffstat (limited to 'drivers/macintosh/macio-adb.c')
| -rw-r--r-- | drivers/macintosh/macio-adb.c | 19 | 
1 files changed, 4 insertions, 15 deletions
| diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c index 314fc0830d90..4b08852c35ee 100644 --- a/drivers/macintosh/macio-adb.c +++ b/drivers/macintosh/macio-adb.c | |||
| @@ -90,22 +90,12 @@ int macio_init(void) | |||
| 90 | { | 90 | { | 
| 91 | struct device_node *adbs; | 91 | struct device_node *adbs; | 
| 92 | struct resource r; | 92 | struct resource r; | 
| 93 | unsigned int irq; | ||
| 93 | 94 | ||
| 94 | adbs = find_compatible_devices("adb", "chrp,adb0"); | 95 | adbs = find_compatible_devices("adb", "chrp,adb0"); | 
| 95 | if (adbs == 0) | 96 | if (adbs == 0) | 
| 96 | return -ENXIO; | 97 | return -ENXIO; | 
| 97 | 98 | ||
| 98 | #if 0 | ||
| 99 | { int i = 0; | ||
| 100 | |||
| 101 | printk("macio_adb_init: node = %p, addrs =", adbs->node); | ||
| 102 | while(!of_address_to_resource(adbs, i, &r)) | ||
| 103 | printk(" %x(%x)", r.start, r.end - r.start); | ||
| 104 | printk(", intrs ="); | ||
| 105 | for (i = 0; i < adbs->n_intrs; ++i) | ||
| 106 | printk(" %x", adbs->intrs[i].line); | ||
| 107 | printk("\n"); } | ||
| 108 | #endif | ||
| 109 | if (of_address_to_resource(adbs, 0, &r)) | 99 | if (of_address_to_resource(adbs, 0, &r)) | 
| 110 | return -ENXIO; | 100 | return -ENXIO; | 
| 111 | adb = ioremap(r.start, sizeof(struct adb_regs)); | 101 | adb = ioremap(r.start, sizeof(struct adb_regs)); | 
| @@ -117,10 +107,9 @@ int macio_init(void) | |||
| 117 | out_8(&adb->active_lo.r, 0xff); | 107 | out_8(&adb->active_lo.r, 0xff); | 
| 118 | out_8(&adb->autopoll.r, APE); | 108 | out_8(&adb->autopoll.r, APE); | 
| 119 | 109 | ||
| 120 | if (request_irq(adbs->intrs[0].line, macio_adb_interrupt, | 110 | irq = irq_of_parse_and_map(adbs, 0); | 
| 121 | 0, "ADB", (void *)0)) { | 111 | if (request_irq(irq, macio_adb_interrupt, 0, "ADB", (void *)0)) { | 
| 122 | printk(KERN_ERR "ADB: can't get irq %d\n", | 112 | printk(KERN_ERR "ADB: can't get irq %d\n", irq); | 
| 123 | adbs->intrs[0].line); | ||
| 124 | return -EAGAIN; | 113 | return -EAGAIN; | 
| 125 | } | 114 | } | 
| 126 | out_8(&adb->intr_enb.r, DFB | TAG); | 115 | out_8(&adb->intr_enb.r, DFB | TAG); | 
