This patch fixes broken rt_init_MUTEX_LOCKED declaration using rt_sema_init() macro. This way we fix a potential compile bug: rt_init_MUTEX_LOCKED calls there_is_no_init_MUTEX_LOCKED_for_RT_semaphores, which is not referenced. (e.g. drivers/char/watchdog/cpu5wdt.c: "cpu5wdt: Unknown symbol there_is_no_init_MUTEX_LOCKED_for_RT_semaphores")
Signed-off-by: Luca Falavigna <[EMAIL PROTECTED]> --- realtime-preempt-2.6.13-rc4-RT-V0.7.52-07.orig 2005-07-31 23:35:18.000000000 +0000 +++ realtime-preempt-2.6.13-rc4-RT-V0.7.52-07 2005-08-01 15:59:31.000000000 +0000 @@ -8342,16 +8342,6 @@ Index: linux/drivers/cpufreq/cpufreq.c =================================================================== --- linux.orig/drivers/cpufreq/cpufreq.c +++ linux/drivers/cpufreq/cpufreq.c -@@ -605,7 +605,8 @@ static int cpufreq_add_dev (struct sys_d - policy->cpu = cpu; - policy->cpus = cpumask_of_cpu(cpu); - -- init_MUTEX_LOCKED(&policy->lock); -+ init_MUTEX(&policy->lock); -+ down(&policy->lock); - init_completion(&policy->kobj_unregister); - INIT_WORK(&policy->update, handle_update, (void *)(long)cpu); - @@ -614,6 +615,7 @@ static int cpufreq_add_dev (struct sys_d */ ret = cpufreq_driver->init(policy); @@ -14350,7 +14340,7 @@ Index: linux/include/linux/rt_lock.h =================================================================== --- /dev/null +++ linux/include/linux/rt_lock.h -@@ -0,0 +1,391 @@ +@@ -0,0 +1,385 @@ +#ifndef __LINUX_RT_LOCK_H +#define __LINUX_RT_LOCK_H + @@ -14589,14 +14579,8 @@ Index: linux/include/linux/rt_lock.h +extern void FASTCALL(__init_MUTEX(struct semaphore *sem, char *name, char *file, int line)); +#define rt_init_MUTEX(sem) \ + __init_MUTEX(sem, #sem, __FILE__, __LINE__) -+ -+extern void there_is_no_init_MUTEX_LOCKED_for_RT_semaphores(void); -+ -+/* -+ * No locked initialization for RT semaphores -+ */ +#define rt_init_MUTEX_LOCKED(sem) \ -+ there_is_no_init_MUTEX_LOCKED_for_RT_semaphores() ++ rt_sema_init(sem, 0) +extern void FASTCALL(rt_down(struct semaphore *sem)); +extern int FASTCALL(rt_down_interruptible(struct semaphore *sem)); +extern int FASTCALL(rt_down_trylock(struct semaphore *sem)); Regards, -- Luca - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/