diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-07-25 12:17:56 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-07-27 15:07:18 -0400 |
commit | 48c7e18d4d6933e2c03a30c2859d37795c3efc7b (patch) | |
tree | 596601c0482da900fdfeeaa5c3340311ad430432 /sound/drivers | |
parent | 11f7e656720b244c062223529e9a8aafeb8d6076 (diff) |
i8253: Convert i8253_lock to atomic_spinlock
Fixup all users.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'sound/drivers')
-rw-r--r-- | sound/drivers/pcsp/pcsp.h | 2 | ||||
-rw-r--r-- | sound/drivers/pcsp/pcsp_input.c | 4 | ||||
-rw-r--r-- | sound/drivers/pcsp/pcsp_lib.c | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sound/drivers/pcsp/pcsp.h b/sound/drivers/pcsp/pcsp.h index 174dd2ff0f22..be7228ce4426 100644 --- a/sound/drivers/pcsp/pcsp.h +++ b/sound/drivers/pcsp/pcsp.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <asm/i8253.h> | 16 | #include <asm/i8253.h> |
17 | #else | 17 | #else |
18 | #include <asm/8253pit.h> | 18 | #include <asm/8253pit.h> |
19 | static DEFINE_SPINLOCK(i8253_lock); | 19 | static DEFINE_ATOMIC_SPINLOCK(i8253_lock); |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | #define PCSP_SOUND_VERSION 0x400 /* read 4.00 */ | 22 | #define PCSP_SOUND_VERSION 0x400 /* read 4.00 */ |
diff --git a/sound/drivers/pcsp/pcsp_input.c b/sound/drivers/pcsp/pcsp_input.c index 0444cdeb4bec..9dfa285832e1 100644 --- a/sound/drivers/pcsp/pcsp_input.c +++ b/sound/drivers/pcsp/pcsp_input.c | |||
@@ -21,7 +21,7 @@ static void pcspkr_do_sound(unsigned int count) | |||
21 | { | 21 | { |
22 | unsigned long flags; | 22 | unsigned long flags; |
23 | 23 | ||
24 | spin_lock_irqsave(&i8253_lock, flags); | 24 | atomic_spin_lock_irqsave(&i8253_lock, flags); |
25 | 25 | ||
26 | if (count) { | 26 | if (count) { |
27 | /* set command for counter 2, 2 byte write */ | 27 | /* set command for counter 2, 2 byte write */ |
@@ -36,7 +36,7 @@ static void pcspkr_do_sound(unsigned int count) | |||
36 | outb(inb_p(0x61) & 0xFC, 0x61); | 36 | outb(inb_p(0x61) & 0xFC, 0x61); |
37 | } | 37 | } |
38 | 38 | ||
39 | spin_unlock_irqrestore(&i8253_lock, flags); | 39 | atomic_spin_unlock_irqrestore(&i8253_lock, flags); |
40 | } | 40 | } |
41 | 41 | ||
42 | void pcspkr_stop_sound(void) | 42 | void pcspkr_stop_sound(void) |
diff --git a/sound/drivers/pcsp/pcsp_lib.c b/sound/drivers/pcsp/pcsp_lib.c index 84cc2658c05b..88f73881b1ca 100644 --- a/sound/drivers/pcsp/pcsp_lib.c +++ b/sound/drivers/pcsp/pcsp_lib.c | |||
@@ -70,7 +70,7 @@ static unsigned long pcsp_timer_update(struct hrtimer *handle) | |||
70 | timer_cnt = val * CUR_DIV() / 256; | 70 | timer_cnt = val * CUR_DIV() / 256; |
71 | 71 | ||
72 | if (timer_cnt && chip->enable) { | 72 | if (timer_cnt && chip->enable) { |
73 | spin_lock_irqsave(&i8253_lock, flags); | 73 | atomic_spin_lock_irqsave(&i8253_lock, flags); |
74 | if (!nforce_wa) { | 74 | if (!nforce_wa) { |
75 | outb_p(chip->val61, 0x61); | 75 | outb_p(chip->val61, 0x61); |
76 | outb_p(timer_cnt, 0x42); | 76 | outb_p(timer_cnt, 0x42); |
@@ -79,7 +79,7 @@ static unsigned long pcsp_timer_update(struct hrtimer *handle) | |||
79 | outb(chip->val61 ^ 2, 0x61); | 79 | outb(chip->val61 ^ 2, 0x61); |
80 | chip->thalf = 1; | 80 | chip->thalf = 1; |
81 | } | 81 | } |
82 | spin_unlock_irqrestore(&i8253_lock, flags); | 82 | atomic_spin_unlock_irqrestore(&i8253_lock, flags); |
83 | } | 83 | } |
84 | 84 | ||
85 | chip->ns_rem = PCSP_PERIOD_NS(); | 85 | chip->ns_rem = PCSP_PERIOD_NS(); |
@@ -152,10 +152,10 @@ static int pcsp_start_playing(struct snd_pcsp *chip) | |||
152 | return -EIO; | 152 | return -EIO; |
153 | } | 153 | } |
154 | 154 | ||
155 | spin_lock(&i8253_lock); | 155 | atomic_spin_lock(&i8253_lock); |
156 | chip->val61 = inb(0x61) | 0x03; | 156 | chip->val61 = inb(0x61) | 0x03; |
157 | outb_p(0x92, 0x43); /* binary, mode 1, LSB only, ch 2 */ | 157 | outb_p(0x92, 0x43); /* binary, mode 1, LSB only, ch 2 */ |
158 | spin_unlock(&i8253_lock); | 158 | atomic_spin_unlock(&i8253_lock); |
159 | atomic_set(&chip->timer_active, 1); | 159 | atomic_set(&chip->timer_active, 1); |
160 | chip->thalf = 0; | 160 | chip->thalf = 0; |
161 | 161 | ||
@@ -176,11 +176,11 @@ static void pcsp_stop_playing(struct snd_pcsp *chip) | |||
176 | return; | 176 | return; |
177 | 177 | ||
178 | atomic_set(&chip->timer_active, 0); | 178 | atomic_set(&chip->timer_active, 0); |
179 | spin_lock(&i8253_lock); | 179 | atomic_spin_lock(&i8253_lock); |
180 | /* restore the timer */ | 180 | /* restore the timer */ |
181 | outb_p(0xb6, 0x43); /* binary, mode 3, LSB/MSB, ch 2 */ | 181 | outb_p(0xb6, 0x43); /* binary, mode 3, LSB/MSB, ch 2 */ |
182 | outb(chip->val61 & 0xFC, 0x61); | 182 | outb(chip->val61 & 0xFC, 0x61); |
183 | spin_unlock(&i8253_lock); | 183 | atomic_spin_unlock(&i8253_lock); |
184 | } | 184 | } |
185 | 185 | ||
186 | /* | 186 | /* |