Re: 2.6.14-rc3-rt1

From: Ingo Molnar
Date: Mon Oct 03 2005 - 01:33:28 EST



* Felix Oxley <lkml@xxxxxxxxx> wrote:

> I have a compile error in drivers/net/hamradio/mkiss.c
>
> CC [M] drivers/net/hamradio/mkiss.o
> drivers/net/hamradio/mkiss.c:625: error:
> RW_LOCK_UNLOCKEDâ undeclared here (not in a function)
>
> Due to the fact that
>
> RW_LOCK_UNLOCKED
>
> has not been converted to the form
>
> RW_LOCK_UNLOCKED(name.lock)
>
> by the RT patch.

i've applied the cleanup below to my tree - it might as well go upstream
too, it's slightly more compact than the explicit initializer.

Ingo

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>

Index: linux/drivers/net/hamradio/mkiss.c
===================================================================
--- linux.orig/drivers/net/hamradio/mkiss.c
+++ linux/drivers/net/hamradio/mkiss.c
@@ -622,7 +622,7 @@ static void ax_setup(struct net_device *
* best way to fix this is to use a rwlock in the tty struct, but for now we
* use a single global rwlock for all ttys in ppp line discipline.
*/
-static rwlock_t disc_data_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(disc_data_lock);

static struct mkiss *mkiss_get(struct tty_struct *tty)
{
-
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/