diff options
author | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2005-05-28 13:40:27 +0000 |
---|---|---|
committer | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2005-05-28 13:40:27 +0000 |
commit | f7965374d480700aefd71e8a8fd7fedf0185115c (patch) | |
tree | b4c961108927bd3ebb21c9e9a0071fc4d5d5f326 | |
parent | 7329f580c8c7e14fbec8bbba59a88b62d27d3405 (diff) |
Notes
-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 34e59e07200d..0ab7d40510a7 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 34e59e07200d..0ab7d40510a7 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 34e59e07200d..0ab7d40510a7 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 f9a36b7b07ff..59c223c5d3dc 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 */ |