Convert OSS aic23 to mutex
PATCH 1/1 Convert OSS aic23 to mutex
ARM: OMAP: Convert OSS aic23 to mutex.
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 */
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..
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.
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 */
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.hbecauselinux/sound.hincludeslinux/fs.hwhich includeslinux/mutex.h. But you are right, includelinux/mutex.his cleaner. Please find updated patch in attachment.
Thanks, pushing today.
Tony