diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-04-23 23:53:04 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-04-24 08:09:02 -0400 |
commit | 30686ba6d56858657829d3eb524ed73e5dc98d2b (patch) | |
tree | 42bf3cea4dc7028fec30377560b367cd8274825e /drivers/media/video/planb.c | |
parent | 1658ab66781d918f604c6069c5cf9a94b6f52f84 (diff) |
[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/media/video/planb.c')
-rw-r--r-- | drivers/media/video/planb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/planb.c b/drivers/media/video/planb.c index 86d2884e16c6..e6e61df0d071 100644 --- a/drivers/media/video/planb.c +++ b/drivers/media/video/planb.c | |||
@@ -2160,7 +2160,7 @@ static int find_planb(void) | |||
2160 | if (!machine_is(powermac)) | 2160 | if (!machine_is(powermac)) |
2161 | return 0; | 2161 | return 0; |
2162 | 2162 | ||
2163 | planb_devices = find_devices("planb"); | 2163 | planb_devices = of_find_node_by_name(NULL, "planb"); |
2164 | if (planb_devices == 0) { | 2164 | if (planb_devices == 0) { |
2165 | planb_num=0; | 2165 | planb_num=0; |
2166 | printk(KERN_WARNING "PlanB: no device found!\n"); | 2166 | printk(KERN_WARNING "PlanB: no device found!\n"); |
@@ -2175,12 +2175,14 @@ static int find_planb(void) | |||
2175 | if (planb_devices->n_addrs != 1) { | 2175 | if (planb_devices->n_addrs != 1) { |
2176 | printk (KERN_WARNING "PlanB: expecting 1 address for planb " | 2176 | printk (KERN_WARNING "PlanB: expecting 1 address for planb " |
2177 | "(got %d)", planb_devices->n_addrs); | 2177 | "(got %d)", planb_devices->n_addrs); |
2178 | of_node_put(planb_devices); | ||
2178 | return 0; | 2179 | return 0; |
2179 | } | 2180 | } |
2180 | 2181 | ||
2181 | if (planb_devices->n_intrs == 0) { | 2182 | if (planb_devices->n_intrs == 0) { |
2182 | printk(KERN_WARNING "PlanB: no intrs for device %s\n", | 2183 | printk(KERN_WARNING "PlanB: no intrs for device %s\n", |
2183 | planb_devices->full_name); | 2184 | planb_devices->full_name); |
2185 | of_node_put(planb_devices); | ||
2184 | return 0; | 2186 | return 0; |
2185 | } else { | 2187 | } else { |
2186 | irq = planb_devices->intrs[0].line; | 2188 | irq = planb_devices->intrs[0].line; |
@@ -2202,6 +2204,7 @@ static int find_planb(void) | |||
2202 | confreg = planb_devices->addrs[0].space & 0xff; | 2204 | confreg = planb_devices->addrs[0].space & 0xff; |
2203 | old_base = planb_devices->addrs[0].address; | 2205 | old_base = planb_devices->addrs[0].address; |
2204 | new_base = 0xf1000000; | 2206 | new_base = 0xf1000000; |
2207 | of_node_put(planb_devices); | ||
2205 | 2208 | ||
2206 | DEBUG("PlanB: Found on bus %d, dev %d, func %d, " | 2209 | DEBUG("PlanB: Found on bus %d, dev %d, func %d, " |
2207 | "membase 0x%x (base reg. 0x%x)\n", | 2210 | "membase 0x%x (base reg. 0x%x)\n", |