Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i8253: Cleanup outb/inb magic

Remove the hysterical outb/inb_pit defines and use outb_p/inb_p in the
code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: John Stultz <john.stultz@linaro.org>
Link: http://lkml.kernel.org/r/20110609130622.348437125@linutronix.de

+3 -6
+3 -3
arch/x86/kernel/apm_32.c
··· 1220 1220 1221 1221 raw_spin_lock_irqsave(&i8253_lock, flags); 1222 1222 /* set the clock to HZ */ 1223 - outb_pit(0x34, PIT_MODE); /* binary, mode 2, LSB/MSB, ch 0 */ 1223 + outb_p(0x34, PIT_MODE); /* binary, mode 2, LSB/MSB, ch 0 */ 1224 1224 udelay(10); 1225 - outb_pit(LATCH & 0xff, PIT_CH0); /* LSB */ 1225 + outb_p(LATCH & 0xff, PIT_CH0); /* LSB */ 1226 1226 udelay(10); 1227 - outb_pit(LATCH >> 8, PIT_CH0); /* MSB */ 1227 + outb_p(LATCH >> 8, PIT_CH0); /* MSB */ 1228 1228 udelay(10); 1229 1229 raw_spin_unlock_irqrestore(&i8253_lock, flags); 1230 1230 #endif
-3
include/linux/i8253.h
··· 20 20 21 21 #define PIT_LATCH ((PIT_TICK_RATE + HZ/2) / HZ) 22 22 23 - #define inb_pit inb_p 24 - #define outb_pit outb_p 25 - 26 23 extern raw_spinlock_t i8253_lock; 27 24 extern struct clock_event_device i8253_clockevent; 28 25 extern void clockevent_i8253_init(bool oneshot);