Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U5

From: Ingo Molnar
Date: Mon Oct 18 2004 - 14:32:09 EST



* K.R. Foley <kr@xxxxxxxxxx> wrote:

> Well you just beat me with that one. :) And here is another for
> aha152x.

> - DECLARE_MUTEX_LOCKED(sem);
> + DECLARE_MUTEX(sem);

almost - the full patch is the one below. (DECLARE_MUTEX() initializes
the mutex as unlocked, so there's a difference.)

Ingo

--- linux/drivers/scsi/aha152x.c.orig
+++ linux/drivers/scsi/aha152x.c
@@ -1160,11 +1160,12 @@ static void timer_expired(unsigned long
static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
{
struct Scsi_Host *shpnt = SCpnt->device->host;
- DECLARE_MUTEX_LOCKED(sem);
+ DECLARE_MUTEX(sem);
struct timer_list timer;
int ret, issued, disconnected;
unsigned long flags;

+ init_MUTEX_LOCKED(&sem);
#if defined(AHA152X_DEBUG)
if(HOSTDATA(shpnt)->debug & debug_eh) {
printk(INFO_LEAD "aha152x_device_reset(%p)", CMDINFO(SCpnt), SCpnt);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/