Re: [patch -mm 17/20] chardev: GPIO for SCx200 & PC-8736x: replacespinlocks w mutexes

From: Andrew Morton
Date: Tue Jun 20 2006 - 01:21:35 EST


On Sat, 17 Jun 2006 12:38:17 -0600
Jim Cromie <jim.cromie@xxxxxxxxx> wrote:

> 17/20. patch.mutexes
>
> Replace spinlocks guarding gpio config ops with mutexes. This is a
> me-too patch, and is justifiable insofar as mutexes have stricter
> semantics and better debugging support, so are preferred where they
> are applicable.
>

OK. I trust this was all tester with all kernel debug options turned on?

Once it's in -mm you might hare to try out the lockdep checker too.


> -static DEFINE_SPINLOCK(scx200_gpio_config_lock);
> +DEFINE_MUTEX(scx200_gpio_config_lock);

But it doesn't need global scope.

> -static DEFINE_SPINLOCK(pc8736x_gpio_config_lock);
> +DEFINE_MUTEX(pc8736x_gpio_config_lock);

Nor does this?

-
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/