Skip to content

Commit

Permalink
include/asm-x86/mc146818rtc.h: checkpatch cleanups - formatting only
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Joe Perches authored and Ingo Molnar committed Apr 17, 2008
1 parent 69cde65 commit 933a441
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions include/asm-x86/mc146818rtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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)
Expand Down

0 comments on commit 933a441

Please sign in to comment.