Skip to content

Commit

Permalink
powerpc/celleb: Use for_each_compatible_node() macro
Browse files Browse the repository at this point in the history
Use for_each_compatible_node() macro instead of open coding it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Wei Yongjun authored and Benjamin Herrenschmidt committed Jan 10, 2013
1 parent 7943b31 commit 176ebf8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/powerpc/platforms/cell/celleb_scc_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,13 @@ static struct {
static int __init txx9_serial_init(void)
{
extern int early_serial_txx9_setup(struct uart_port *port);
struct device_node *node = NULL;
struct device_node *node;
int i;
struct uart_port req;
struct of_irq irq;
struct resource res;

while ((node = of_find_compatible_node(node,
"serial", "toshiba,sio-scc")) != NULL) {
for_each_compatible_node(node, "serial", "toshiba,sio-scc") {
for (i = 0; i < ARRAY_SIZE(txx9_scc_tab); i++) {
if (!(txx9_serial_bitmap & (1<<i)))
continue;
Expand Down

0 comments on commit 176ebf8

Please sign in to comment.