Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9f7afa6b3405a2ceb9403153357564a93f14cde8
Commit:     9f7afa6b3405a2ceb9403153357564a93f14cde8
Parent:     dbf379ea9ae878bf88d2b3cf8f74ce4536e25d19
Author:     Matthias Kaehlcke <[EMAIL PROTECTED]>
AuthorDate: Thu May 3 20:15:14 2007 -0700
Committer:  Wim Van Sebroeck <[EMAIL PROTECTED]>
CommitDate: Fri May 4 06:07:59 2007 +0000

    [WATCHDOG] use mutex instead of semaphore in Berkshire USB-PC Watchdog 
driver
    
    The Berkshire USB-PC Watchdog driver uses a semaphore as mutex.  Use the 
mutex
    API instead of the (binary) semaphore.
    
    Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]>
    Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]>
    Cc: Greg KH <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
 drivers/char/watchdog/pcwd_usb.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/char/watchdog/pcwd_usb.c b/drivers/char/watchdog/pcwd_usb.c
index 31037f9..1e7a671 100644
--- a/drivers/char/watchdog/pcwd_usb.c
+++ b/drivers/char/watchdog/pcwd_usb.c
@@ -146,7 +146,7 @@ struct usb_pcwd_private {
        atomic_t                cmd_received;           /* true if we received 
a report after a command */
 
        int                     exists;                 /* Wether or not the 
device exists */
-       struct semaphore        sem;                    /* locks this structure 
*/
+       struct mutex            mtx;                    /* locks this structure 
*/
 };
 static struct usb_pcwd_private *usb_pcwd_device;
 
@@ -635,7 +635,7 @@ static int usb_pcwd_probe(struct usb_interface *interface, 
const struct usb_devi
 
        usb_pcwd_device = usb_pcwd;
 
-       init_MUTEX (&usb_pcwd->sem);
+       mutex_init(&usb_pcwd->mtx);
        usb_pcwd->udev = udev;
        usb_pcwd->interface = interface;
        usb_pcwd->interface_number = iface_desc->desc.bInterfaceNumber;
@@ -763,7 +763,7 @@ static void usb_pcwd_disconnect(struct usb_interface 
*interface)
        usb_pcwd = usb_get_intfdata (interface);
        usb_set_intfdata (interface, NULL);
 
-       down (&usb_pcwd->sem);
+       mutex_lock(&usb_pcwd->mtx);
 
        /* Stop the timer before we leave */
        if (!nowayout)
@@ -777,7 +777,7 @@ static void usb_pcwd_disconnect(struct usb_interface 
*interface)
        misc_deregister(&usb_pcwd_temperature_miscdev);
        unregister_reboot_notifier(&usb_pcwd_notifier);
 
-       up (&usb_pcwd->sem);
+       mutex_unlock(&usb_pcwd->mtx);
 
        /* Delete the USB PCWD device */
        usb_pcwd_delete(usb_pcwd);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to