diff options
author | Joe Perches <joe@perches.com> | 2008-03-23 01:02:40 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 17:41:24 +0200 |
commit | 933a44155caeb4ff5b58fcf755e3381ae37e72d4 (patch) | |
tree | a3ec42f7a1dc30c37c8272b612b05ed237ec75a6 /include/asm-x86/mc146818rtc.h | |
parent | 69cde6512c3a0227878869f9ba8a02cdc72fc253 (diff) | |
download | blackbird-op-linux-933a44155caeb4ff5b58fcf755e3381ae37e72d4.tar.gz blackbird-op-linux-933a44155caeb4ff5b58fcf755e3381ae37e72d4.zip |
include/asm-x86/mc146818rtc.h: checkpatch cleanups - formatting only
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/mc146818rtc.h')
-rw-r--r-- | include/asm-x86/mc146818rtc.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/asm-x86/mc146818rtc.h b/include/asm-x86/mc146818rtc.h index cdd9f965835a..daf1ccde77af 100644 --- a/include/asm-x86/mc146818rtc.h +++ b/include/asm-x86/mc146818rtc.h @@ -42,7 +42,7 @@ extern volatile unsigned long cmos_lock; static inline void lock_cmos(unsigned char reg) { unsigned long new; - new = ((smp_processor_id()+1) << 8) | reg; + new = ((smp_processor_id() + 1) << 8) | reg; for (;;) { if (cmos_lock) { cpu_relax(); @@ -57,22 +57,26 @@ static inline void unlock_cmos(void) { cmos_lock = 0; } + static inline int do_i_have_lock_cmos(void) { - return (cmos_lock >> 8) == (smp_processor_id()+1); + return (cmos_lock >> 8) == (smp_processor_id() + 1); } + static inline unsigned char current_lock_cmos_reg(void) { return cmos_lock & 0xff; } -#define lock_cmos_prefix(reg) \ + +#define lock_cmos_prefix(reg) \ do { \ unsigned long cmos_flags; \ local_irq_save(cmos_flags); \ lock_cmos(reg) -#define lock_cmos_suffix(reg) \ - unlock_cmos(); \ - local_irq_restore(cmos_flags); \ + +#define lock_cmos_suffix(reg) \ + unlock_cmos(); \ + local_irq_restore(cmos_flags); \ } while (0) #else #define lock_cmos_prefix(reg) do {} while (0) |