Commit ac350c46 authored by Kevin Hilman's avatar Kevin Hilman Committed by Tony Lindgren

[PATCH] ARM: OMAP: rework mutex_init() for RT compatibility

Replace remaining __MUTEX_INITIALIZER() calls with mutex_init() to
enable compatibility with the realtime-preempt patchset.
Signed-off-by: default avatarKevin Hilman <khilman@deeprooted.net>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 72cb168c
...@@ -156,6 +156,7 @@ static struct platform_device h4_smc91x_device = { ...@@ -156,6 +156,7 @@ static struct platform_device h4_smc91x_device = {
/* Select between the IrDA and aGPS module /* Select between the IrDA and aGPS module
*/ */
#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
static int h4_select_irda(struct device *dev, int state) static int h4_select_irda(struct device *dev, int state)
{ {
unsigned char expa; unsigned char expa;
...@@ -212,6 +213,10 @@ static int h4_transceiver_mode(struct device *dev, int mode) ...@@ -212,6 +213,10 @@ static int h4_transceiver_mode(struct device *dev, int mode)
return 0; return 0;
} }
#else
static int h4_select_irda(struct device *dev, int state) { return 0; }
static int h4_transceiver_mode(struct device *dev, int mode) { return 0; }
#endif
static struct omap_irda_config h4_irda_data = { static struct omap_irda_config h4_irda_data = {
.transceiver_cap = IR_SIRMODE | IR_MIRMODE | IR_FIRMODE, .transceiver_cap = IR_SIRMODE | IR_MIRMODE | IR_FIRMODE,
......
...@@ -59,7 +59,6 @@ struct cpustat { ...@@ -59,7 +59,6 @@ struct cpustat {
void (*mem_rel_cb)(void); void (*mem_rel_cb)(void);
}; };
struct cpustat cpustat = { struct cpustat cpustat = {
.lock = __MUTEX_INITIALIZER(cpustat.lock),
.stat = CPUSTAT_RESET, .stat = CPUSTAT_RESET,
.icrmask = 0xffff, .icrmask = 0xffff,
}; };
...@@ -243,6 +242,8 @@ static int init_done; ...@@ -243,6 +242,8 @@ static int init_done;
static int __init omap_dsp_init(void) static int __init omap_dsp_init(void)
{ {
mutex_init(&cpustat.lock);
dspmem_size = 0; dspmem_size = 0;
#ifdef CONFIG_ARCH_OMAP15XX #ifdef CONFIG_ARCH_OMAP15XX
if (cpu_is_omap1510()) { if (cpu_is_omap1510()) {
......
...@@ -244,7 +244,6 @@ static audio_state_t aic23_state = { ...@@ -244,7 +244,6 @@ static audio_state_t aic23_state = {
.hw_remove = __exit_p(omap_aic23_remove), .hw_remove = __exit_p(omap_aic23_remove),
.hw_suspend = omap_aic23_suspend, .hw_suspend = omap_aic23_suspend,
.hw_resume = omap_aic23_resume, .hw_resume = omap_aic23_resume,
.mutex = __MUTEX_INITIALIZER(aic23_state.mutex),
}; };
/* This will be defined in the audio.h */ /* This will be defined in the audio.h */
...@@ -673,6 +672,8 @@ static int __init audio_aic23_init(void) ...@@ -673,6 +672,8 @@ static int __init audio_aic23_init(void)
if (machine_is_omap_h2() || machine_is_omap_h3()) if (machine_is_omap_h2() || machine_is_omap_h3())
return -ENODEV; return -ENODEV;
mutex_init(&aic23_state.mutex);
if (machine_is_omap_osk()) { if (machine_is_omap_osk()) {
/* Set MCLK to be clock input for AIC23 */ /* Set MCLK to be clock input for AIC23 */
aic23_mclk = clk_get(0, "mclk"); aic23_mclk = clk_get(0, "mclk");
......
...@@ -326,7 +326,6 @@ static audio_state_t tsc2101_state = { ...@@ -326,7 +326,6 @@ static audio_state_t tsc2101_state = {
.hw_remove = omap_tsc2101_remove, .hw_remove = omap_tsc2101_remove,
.hw_suspend = omap_tsc2101_suspend, .hw_suspend = omap_tsc2101_suspend,
.hw_resume = omap_tsc2101_resume, .hw_resume = omap_tsc2101_resume,
.mutex = __MUTEX_INITIALIZER(tsc2101_state.mutex),
}; };
/* This will be defined in the Audio.h */ /* This will be defined in the Audio.h */
...@@ -1031,6 +1030,8 @@ static int __init audio_tsc2101_init(void) ...@@ -1031,6 +1030,8 @@ static int __init audio_tsc2101_init(void)
if (machine_is_omap_osk() || machine_is_omap_innovator()) if (machine_is_omap_osk() || machine_is_omap_innovator())
return -ENODEV; return -ENODEV;
mutex_init(&tsc2101_state.mutex);
/* register the codec with the audio driver */ /* register the codec with the audio driver */
if ((err = audio_register_codec(&tsc2101_state))) { if ((err = audio_register_codec(&tsc2101_state))) {
printk(KERN_ERR printk(KERN_ERR
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment