From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from canuck.infradead.org (canuck.infradead.org [205.233.218.70]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id 4F73A68A29 for ; Sat, 14 Jan 2006 11:15:32 +1100 (EST) Subject: [PATCH] macio-adb build fix From: David Woodhouse To: paulus@samba.org Content-Type: text/plain Date: Sat, 14 Jan 2006 00:15:19 +0000 Message-Id: <1137197719.3621.37.camel@pmac.infradead.org> Mime-Version: 1.0 Cc: linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This makes macio-adb.c build again. Entirely untested. Signed-off-by: David Woodhouse --- drivers/macintosh/macio-adb.c~ 2006-01-03 03:21:10.000000000 +0000 +++ drivers/macintosh/macio-adb.c 2006-01-14 00:13:43.000000000 +0000 @@ -17,6 +17,7 @@ #include #include #include +#include struct preg { unsigned char r; @@ -88,24 +89,26 @@ int macio_probe(void) int macio_init(void) { struct device_node *adbs; + struct resource r; adbs = find_compatible_devices("adb", "chrp,adb0"); if (adbs == 0) return -ENXIO; #if 0 - { int i; + { int i = 0; printk("macio_adb_init: node = %p, addrs =", adbs->node); - for (i = 0; i < adbs->n_addrs; ++i) - printk(" %x(%x)", adbs->addrs[i].address, adbs->addrs[i].size); + while(!of_address_to_resource(adbs, i, &r)) + printk(" %x(%x)", r.start, r.end - r.start); printk(", intrs ="); for (i = 0; i < adbs->n_intrs; ++i) printk(" %x", adbs->intrs[i].line); printk("\n"); } #endif - - adb = ioremap(adbs->addrs->address, sizeof(struct adb_regs)); + if (of_address_to_resource(adbs, 0, &r)) + return -ENXIO; + adb = ioremap(r.start, sizeof(struct adb_regs)); out_8(&adb->ctrl.r, 0); out_8(&adb->intr.r, 0); -- dwmw2