diff options
-rw-r--r-- | sys/alpha/include/timerreg.h | 12 | ||||
-rw-r--r-- | sys/amd64/include/timerreg.h | 12 | ||||
-rw-r--r-- | sys/i386/include/timerreg.h | 12 | ||||
-rw-r--r-- | sys/pc98/include/timerreg.h | 12 |
4 files changed, 20 insertions, 28 deletions
diff --git a/sys/alpha/include/timerreg.h b/sys/alpha/include/timerreg.h index 34e59e0..0ab7d40 100644 --- a/sys/alpha/include/timerreg.h +++ b/sys/alpha/include/timerreg.h @@ -54,13 +54,11 @@ #define timer_spkr_release() \ release_timer2() -static __inline void -spkr_set_pitch(u_int16_t pitch) -{ - - outb(TIMER_CNTR2, pitch & 0xff); - outb(TIMER_CNTR2, pitch >> 8); -} +#define spkr_set_pitch(pitch) \ + do { \ + outb(TIMER_CNTR2, (pitch) & 0xff); \ + outb(TIMER_CNTR2, (pitch) >> 8); \ + } while(0) #endif /* _KERNEL */ diff --git a/sys/amd64/include/timerreg.h b/sys/amd64/include/timerreg.h index 34e59e0..0ab7d40 100644 --- a/sys/amd64/include/timerreg.h +++ b/sys/amd64/include/timerreg.h @@ -54,13 +54,11 @@ #define timer_spkr_release() \ release_timer2() -static __inline void -spkr_set_pitch(u_int16_t pitch) -{ - - outb(TIMER_CNTR2, pitch & 0xff); - outb(TIMER_CNTR2, pitch >> 8); -} +#define spkr_set_pitch(pitch) \ + do { \ + outb(TIMER_CNTR2, (pitch) & 0xff); \ + outb(TIMER_CNTR2, (pitch) >> 8); \ + } while(0) #endif /* _KERNEL */ diff --git a/sys/i386/include/timerreg.h b/sys/i386/include/timerreg.h index 34e59e0..0ab7d40 100644 --- a/sys/i386/include/timerreg.h +++ b/sys/i386/include/timerreg.h @@ -54,13 +54,11 @@ #define timer_spkr_release() \ release_timer2() -static __inline void -spkr_set_pitch(u_int16_t pitch) -{ - - outb(TIMER_CNTR2, pitch & 0xff); - outb(TIMER_CNTR2, pitch >> 8); -} +#define spkr_set_pitch(pitch) \ + do { \ + outb(TIMER_CNTR2, (pitch) & 0xff); \ + outb(TIMER_CNTR2, (pitch) >> 8); \ + } while(0) #endif /* _KERNEL */ diff --git a/sys/pc98/include/timerreg.h b/sys/pc98/include/timerreg.h index f9a36b7..59c223c 100644 --- a/sys/pc98/include/timerreg.h +++ b/sys/pc98/include/timerreg.h @@ -54,13 +54,11 @@ #define timer_spkr_release() \ release_timer1() -static __inline void -spkr_set_pitch(u_int16_t pitch) -{ - - outb(TIMER_CNTR1, pitch & 0xff); - outb(TIMER_CNTR1, pitch >> 8); -} +#define spkr_set_pitch(pitch) \ + do { \ + outb(TIMER_CNTR1, (pitch) & 0xff); \ + outb(TIMER_CNTR1, (pitch) >> 8); \ + } while(0) #endif /* _KERNEL */ |