summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/ans-lcd.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-04-24 05:53:04 +0200
committerPaul Mackerras <paulus@samba.org>2007-04-24 14:09:02 +0200
commit30686ba6d56858657829d3eb524ed73e5dc98d2b (patch)
tree42bf3cea4dc7028fec30377560b367cd8274825e /drivers/macintosh/ans-lcd.c
parent[POWERPC] Remove old interface find_type_devices (diff)
downloadlinux-30686ba6d56858657829d3eb524ed73e5dc98d2b.tar.xz
linux-30686ba6d56858657829d3eb524ed73e5dc98d2b.zip
[POWERPC] Remove old interface find_devices
Replace uses with of_find_node_by_name and for_each_node_by_name. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/macintosh/ans-lcd.c')
-rw-r--r--drivers/macintosh/ans-lcd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c
index cdd5a0f72e3c..e54c4d9f6365 100644
--- a/drivers/macintosh/ans-lcd.c
+++ b/drivers/macintosh/ans-lcd.c
@@ -145,11 +145,12 @@ anslcd_init(void)
int retval;
struct device_node* node;
- node = find_devices("lcd");
- if (!node || !node->parent)
- return -ENODEV;
- if (strcmp(node->parent->name, "gc"))
+ node = of_find_node_by_name(NULL, "lcd");
+ if (!node || !node->parent || strcmp(node->parent->name, "gc")) {
+ of_node_put(node);
return -ENODEV;
+ }
+ of_node_put(node);
anslcd_ptr = ioremap(ANSLCD_ADDR, 0x20);