diff options
author | Evgeniy Polyakov <johnpol@2ka.mipt.ru> | 2006-04-03 12:04:27 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-22 11:22:50 -0700 |
commit | abd52a13206e02537ca1dc08fc5438c7d27bdbf1 (patch) | |
tree | efe0ff89898aad10600d392ac727dcea9e7af322 /drivers/w1/masters/ds2490.c | |
parent | 46e07f6e5eb0e465e086b8f485f4238bd453e3e9 (diff) |
[PATCH] w1: Use mutexes instead of semaphores.
Use mutexes instead of semaphores.
Patch tested on x86_64 and i386 with test bus master driver.
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/w1/masters/ds2490.c')
-rw-r--r-- | drivers/w1/masters/ds2490.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/w1/masters/ds2490.c b/drivers/w1/masters/ds2490.c index 637677833da5..299e274d241a 100644 --- a/drivers/w1/masters/ds2490.c +++ b/drivers/w1/masters/ds2490.c @@ -169,7 +169,7 @@ static int ds_send_control(struct ds_device *, u16, u16); static int ds_send_control_cmd(struct ds_device *, u16, u16); static LIST_HEAD(ds_devices); -static DECLARE_MUTEX(ds_mutex); +static DEFINE_MUTEX(ds_mutex); static struct usb_driver ds_driver = { .name = "DS9490R", @@ -887,9 +887,9 @@ static int ds_probe(struct usb_interface *intf, if (err) goto err_out_clear; - down(&ds_mutex); + mutex_lock(&ds_mutex); list_add_tail(&dev->ds_entry, &ds_devices); - up(&ds_mutex); + mutex_unlock(&ds_mutex); return 0; @@ -909,9 +909,9 @@ static void ds_disconnect(struct usb_interface *intf) if (!dev) return; - down(&ds_mutex); + mutex_lock(&ds_mutex); list_del(&dev->ds_entry); - up(&ds_mutex); + mutex_unlock(&ds_mutex); ds_w1_fini(dev); |