Skip to contentSkip to conversation

Convert OSS aic23 to mutex

PATCH In review Dirk Behme 3 participants 4 messages Apr 5, 2006 – Apr 28, 2006 Sound

lore
Share & tools
lore

Dirk Behme

author
#0 lore raw

PATCH 1/1 Convert OSS aic23 to mutex

ARM: OMAP: Convert OSS aic23 to mutex.

Signed-off-by Dirk Behme <dirk.behme_at_gmail.com>
sound/oss/omap-audio-aic23.c renamed from sound/oss/omap-audio-aic23.c_orig +1 -1
@@ -243,7 +243,7 @@ static audio_state_t aic23_state = {
         .hw_remove      =  __exit_p(omap_aic23_remove),
         .hw_suspend     = omap_aic23_suspend,
         .hw_resume      = omap_aic23_resume,
-	.sem	    = __SEMAPHORE_INIT(aic23_state.sem, 1),
+	.mutex	    = __MUTEX_INITIALIZER(aic23_state.mutex),
 };
 
 /* This will be defined in the audio.h */
#1 lore raw

sound/oss/omap-audio-aic23.c static audio_state_t aic23_state = { · line 249

Quoted 12 lines · Dirk Behme
sound/oss/omap-audio-aic23.c renamed from sound/oss/omap-audio-aic23.c_orig +1 -1
@@ -243,7 +243,7 @@ static audio_state_t aic23_state = {
         .hw_remove      =  __exit_p(omap_aic23_remove),
         .hw_suspend     = omap_aic23_suspend,
         .hw_resume      = omap_aic23_resume,
-	.sem	    = __SEMAPHORE_INIT(aic23_state.sem, 1),
+	.mutex	    = __MUTEX_INITIALIZER(aic23_state.mutex),
 };
 
 /* This will be defined in the audio.h */

Are you sure this doesn't need an #include <linux/mutex.h>? All of the other conversions so far have..

author
#2 lore raw
Quoted 2 lines · Paul Mundt

Are you sure this doesn't need an #include <linux/mutex.h>? All of the other conversions so far have..

It compiles without extra linux/mutex.h because linux/sound.h includes linux/fs.h which includes linux/mutex.h. But you are right, include linux/mutex.h is cleaner. Please find updated patch in attachment.

Cheers

Dirk

ARM: OMAP: Convert OSS aic23 to mutex.

Signed-off-by Dirk Behme <dirk.behme_at_gmail.com>
sound/oss/omap-audio-aic23.c renamed from sound/oss/omap-audio-aic23.c_orig +2 -1
@@ -38,6 +38,7 @@
 #include <linux/sound.h>
 #include <linux/soundcard.h>
 #include <linux/clk.h>
+#include <linux/mutex.h>
 
 #include <asm/uaccess.h>
 #include <asm/hardware.h>
@@ -243,7 +244,7 @@ static audio_state_t aic23_state = {
         .hw_remove      =  __exit_p(omap_aic23_remove),
         .hw_suspend     = omap_aic23_suspend,
         .hw_resume      = omap_aic23_resume,
-	.sem	    = __SEMAPHORE_INIT(aic23_state.sem, 1),
+	.mutex	    = __MUTEX_INITIALIZER(aic23_state.mutex),
 };
 
 /* This will be defined in the audio.h */
#3 lore raw
Quoted 8 lines · Dirk Behme
Quoted 2 lines · Paul Mundt

Are you sure this doesn't need an #include <linux/mutex.h>? All of the other conversions so far have..

It compiles without extra linux/mutex.h because linux/sound.h includes linux/fs.h which includes linux/mutex.h. But you are right, include linux/mutex.h is cleaner. Please find updated patch in attachment.

Thanks, pushing today.

Tony