Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ba28cc09316510aacb17f8421fdaae37969a4d5b
Commit:     ba28cc09316510aacb17f8421fdaae37969a4d5b
Parent:     a4fc3a3cead7f9e00dc0f6e00238b11c030f94cc
Author:     Linas Vepstas <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 9 06:02:10 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Fri Aug 17 11:01:52 2007 +1000

    [POWERPC] pseries: Use rtas_token instead of hand-rolled code
    
    The rtas_token() call does the same thing as this hand-rolled code.
    This makes the code easier to read.
    
    Signed-off-by: Linas Vepstas <[EMAIL PROTECTED]>
    
    ----
     arch/powerpc/platforms/pseries/rtasd.c |   13 ++-----------
     1 file changed, 2 insertions(+), 11 deletions(-)
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/pseries/rtasd.c |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/rtasd.c 
b/arch/powerpc/platforms/pseries/rtasd.c
index 762fe87..48e6dc0 100644
--- a/arch/powerpc/platforms/pseries/rtasd.c
+++ b/arch/powerpc/platforms/pseries/rtasd.c
@@ -361,26 +361,17 @@ static int enable_surveillance(int timeout)
 
 static int get_eventscan_parms(void)
 {
-       struct device_node *node;
-       const int *ip;
-
-       node = of_find_node_by_path("/rtas");
-
-       ip = of_get_property(node, "rtas-event-scan-rate", NULL);
-       if (ip == NULL) {
+       rtas_event_scan_rate = rtas_token("rtas-event-scan-rate");
+       if (rtas_event_scan_rate == RTAS_UNKNOWN_SERVICE) {
                printk(KERN_ERR "rtasd: no rtas-event-scan-rate\n");
-               of_node_put(node);
                return -1;
        }
-       rtas_event_scan_rate = *ip;
        DEBUG("rtas-event-scan-rate %d\n", rtas_event_scan_rate);
 
        /* Make room for the sequence number */
        rtas_error_log_max = rtas_get_error_log_max();
        rtas_error_log_buffer_max = rtas_error_log_max + sizeof(int);
 
-       of_node_put(node);
-
        return 0;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to