[PATCH] powerpc: macio-adb build fix

This makes macio-adb.c build again. Entirely untested.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by David Woodhouse and committed by Paul Mackerras 36874579 575e3216

+8 -5
+8 -5
drivers/macintosh/macio-adb.c
··· 17 #include <asm/irq.h> 18 #include <asm/system.h> 19 #include <linux/init.h> 20 21 struct preg { 22 unsigned char r; ··· 89 int macio_init(void) 90 { 91 struct device_node *adbs; 92 93 adbs = find_compatible_devices("adb", "chrp,adb0"); 94 if (adbs == 0) 95 return -ENXIO; 96 97 #if 0 98 - { int i; 99 100 printk("macio_adb_init: node = %p, addrs =", adbs->node); 101 - for (i = 0; i < adbs->n_addrs; ++i) 102 - printk(" %x(%x)", adbs->addrs[i].address, adbs->addrs[i].size); 103 printk(", intrs ="); 104 for (i = 0; i < adbs->n_intrs; ++i) 105 printk(" %x", adbs->intrs[i].line); 106 printk("\n"); } 107 #endif 108 - 109 - adb = ioremap(adbs->addrs->address, sizeof(struct adb_regs)); 110 111 out_8(&adb->ctrl.r, 0); 112 out_8(&adb->intr.r, 0);
··· 17 #include <asm/irq.h> 18 #include <asm/system.h> 19 #include <linux/init.h> 20 + #include <linux/ioport.h> 21 22 struct preg { 23 unsigned char r; ··· 88 int macio_init(void) 89 { 90 struct device_node *adbs; 91 + struct resource r; 92 93 adbs = find_compatible_devices("adb", "chrp,adb0"); 94 if (adbs == 0) 95 return -ENXIO; 96 97 #if 0 98 + { int i = 0; 99 100 printk("macio_adb_init: node = %p, addrs =", adbs->node); 101 + while(!of_address_to_resource(adbs, i, &r)) 102 + printk(" %x(%x)", r.start, r.end - r.start); 103 printk(", intrs ="); 104 for (i = 0; i < adbs->n_intrs; ++i) 105 printk(" %x", adbs->intrs[i].line); 106 printk("\n"); } 107 #endif 108 + if (of_address_to_resource(adbs, 0, &r)) 109 + return -ENXIO; 110 + adb = ioremap(r.start, sizeof(struct adb_regs)); 111 112 out_8(&adb->ctrl.r, 0); 113 out_8(&adb->intr.r, 0);