From e85fa1efaf59daf213915cfc33df095da80aa923 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Wed, 4 Nov 2009 23:59:18 -0800 Subject: [PATCH] --- yaml --- r: 170397 b: refs/heads/master c: d13500981e7df7f0e84d7f37f85d720cefe6043e h: refs/heads/master i: 170395: 95ed71b65d4a55349af218e0dd3c067172a94287 v: v3 --- [refs] | 2 +- trunk/drivers/serial/apbuart.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index df4718b25ea0..896f6d6103a6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 384a17b284b9dc92b480cf388310a25e255bac8a +refs/heads/master: d13500981e7df7f0e84d7f37f85d720cefe6043e diff --git a/trunk/drivers/serial/apbuart.c b/trunk/drivers/serial/apbuart.c index c7883a36be9d..5f9dec38db81 100644 --- a/trunk/drivers/serial/apbuart.c +++ b/trunk/drivers/serial/apbuart.c @@ -29,7 +29,6 @@ #include #include #include -#include #include "apbuart.h" @@ -596,10 +595,9 @@ static struct of_platform_driver grlib_apbuart_of_driver = { static void grlib_apbuart_configure(void) { static int enum_done; - struct device_node *np; + struct device_node *np, *rp; struct uart_port *port = NULL; - - int node; + const u32 *prop; int freq_khz; int v = 0, d = 0; unsigned int addr; @@ -610,8 +608,10 @@ static void grlib_apbuart_configure(void) return; /* Get bus frequency */ - node = prom_getchild(prom_root_node); - freq_khz = prom_getint(node, "clock-frequency"); + rp = of_find_node_by_name(NULL, "/"); + rp = of_get_next_child(rp, NULL); + prop = of_get_property(rp, "clock-frequency", NULL); + freq_khz = *prop; line = 0; for_each_matching_node(np, apbuart_match) {