]> err.no Git - linux-2.6/commitdiff
[PATCH] scx200_hrt: fix precedence bug manifesting as 27x clock in 1 MHz mode
authorJim Cromie <jim.cromie@gmail.com>
Wed, 4 Oct 2006 09:15:35 +0000 (02:15 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 4 Oct 2006 14:55:14 +0000 (07:55 -0700)
Fix paren-placement / precedence bug breaking initialization for 1 MHz
clock mode.

Also fix comment spelling error, and fence-post (off-by-one) error on
symbol used in request_region.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=7242

Thanks alexander.krause@erazor-zone.de, dzpost@dedekind.net, for the
reports and patch test, and phelps@mantara.com for the independent patch
and verification.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Cc: <alexander.krause@erazor-zone.de>
Cc: <dzpost@dedekind.net>
Cc: <phelps@mantara.com>
Acked-by: John Stultz <johnstul@us.ibm.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/clocksource/scx200_hrt.c
include/linux/scx200.h

index d418b8297211fa9f7497bd09297f8c6fcad66831..22915cc46ba7fbe56ef7e52896ce74c9490b8e7a 100644 (file)
@@ -63,7 +63,7 @@ static struct clocksource cs_hrt = {
 
 static int __init init_hrt_clocksource(void)
 {
-       /* Make sure scx200 has initializedd the configuration block */
+       /* Make sure scx200 has initialized the configuration block */
        if (!scx200_cb_present())
                return -ENODEV;
 
@@ -76,7 +76,7 @@ static int __init init_hrt_clocksource(void)
        }
 
        /* write timer config */
-       outb(HR_TMEN | (mhz27) ? HR_TMCLKSEL : 0,
+       outb(HR_TMEN | (mhz27 ? HR_TMCLKSEL : 0),
             scx200_cb_base + SCx200_TMCNFG_OFFSET);
 
        if (mhz27) {
index 693c0557e70bdf6b13baa898a4dca5c82b8ae919..de466e11e271a92df49206d317a5ce6572f3d6af 100644 (file)
@@ -32,7 +32,7 @@ extern unsigned scx200_cb_base;
 
 /* High Resolution Timer */
 #define SCx200_TIMER_OFFSET 0x08
-#define SCx200_TIMER_SIZE 0x05
+#define SCx200_TIMER_SIZE 0x06
 
 /* Clock Generators */
 #define SCx200_CLOCKGEN_OFFSET 0x10