lkml.org 
[lkml]   [2007]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] use spinlock instead of binary mutex in idt77252 driver
On 4/23/07, Matthias Kaehlcke <matthias.kaehlcke@gmail.com> wrote:
> use spinlock instead of binary mutex in idt77252 driver
>
> Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
>
> --
>
> diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
> index b4b8014..e3cf141 100644
> --- a/drivers/atm/idt77252.c
> +++ b/drivers/atm/idt77252.c
> @@ -2430,7 +2430,7 @@ idt77252_open(struct atm_vcc *vcc)
>
> set_bit(ATM_VF_ADDR, &vcc->flags);
>
> - down(&card->mutex);
> + mutex_lock(&card->mutex);

Note that you're actually replacing a semaphore with a mutex here (and
not a mutex with a spinlock). I guess that should be fine and
desirable as long as the semaphore was indeed being used a mutex
(binary) in this code.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-04-23 01:55    [W:0.079 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site