aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/macio-adb.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-05-01 00:24:54 -0400
committerDmitry Torokhov <dtor@insightbb.com>2007-05-01 00:24:54 -0400
commitbc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775 (patch)
tree427fcf2a7287c16d4b5aa6cbf494d59579a6a8b1 /drivers/macintosh/macio-adb.c
parentInput: cobalt_btns - convert to use polldev library (diff)
parentlibata: honour host controllers that want just one host (diff)
downloadlinux-dev-bc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775.tar.xz
linux-dev-bc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/usb/input/Makefile drivers/usb/input/gtco.c
Diffstat (limited to 'drivers/macintosh/macio-adb.c')
-rw-r--r--drivers/macintosh/macio-adb.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c
index 026b67f4f659..79119f56e82d 100644
--- a/drivers/macintosh/macio-adb.c
+++ b/drivers/macintosh/macio-adb.c
@@ -82,7 +82,14 @@ struct adb_driver macio_adb_driver = {
int macio_probe(void)
{
- return find_compatible_devices("adb", "chrp,adb0")? 0: -ENODEV;
+ struct device_node *np;
+
+ np = of_find_compatible_node(NULL, "adb", "chrp,adb0");
+ if (np) {
+ of_node_put(np);
+ return 0;
+ }
+ return -ENODEV;
}
int macio_init(void)
@@ -91,12 +98,14 @@ int macio_init(void)
struct resource r;
unsigned int irq;
- adbs = find_compatible_devices("adb", "chrp,adb0");
+ adbs = of_find_compatible_node(NULL, "adb", "chrp,adb0");
if (adbs == 0)
return -ENXIO;
- if (of_address_to_resource(adbs, 0, &r))
+ if (of_address_to_resource(adbs, 0, &r)) {
+ of_node_put(adbs);
return -ENXIO;
+ }
adb = ioremap(r.start, sizeof(struct adb_regs));
out_8(&adb->ctrl.r, 0);
@@ -107,6 +116,7 @@ int macio_init(void)
out_8(&adb->autopoll.r, APE);
irq = irq_of_parse_and_map(adbs, 0);
+ of_node_put(adbs);
if (request_irq(irq, macio_adb_interrupt, 0, "ADB", (void *)0)) {
printk(KERN_ERR "ADB: can't get irq %d\n", irq);
return -EAGAIN;