diff options
Diffstat (limited to 'drivers/char/watchdog/pcwd_usb.c')
-rw-r--r-- | 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 31037f9c9ffe..1e7a6719d5ba 100644 --- a/drivers/char/watchdog/pcwd_usb.c +++ b/drivers/char/watchdog/pcwd_usb.c | |||
@@ -146,7 +146,7 @@ struct usb_pcwd_private { | |||
146 | atomic_t cmd_received; /* true if we received a report after a command */ | 146 | atomic_t cmd_received; /* true if we received a report after a command */ |
147 | 147 | ||
148 | int exists; /* Wether or not the device exists */ | 148 | int exists; /* Wether or not the device exists */ |
149 | struct semaphore sem; /* locks this structure */ | 149 | struct mutex mtx; /* locks this structure */ |
150 | }; | 150 | }; |
151 | static struct usb_pcwd_private *usb_pcwd_device; | 151 | static struct usb_pcwd_private *usb_pcwd_device; |
152 | 152 | ||
@@ -635,7 +635,7 @@ static int usb_pcwd_probe(struct usb_interface *interface, const struct usb_devi | |||
635 | 635 | ||
636 | usb_pcwd_device = usb_pcwd; | 636 | usb_pcwd_device = usb_pcwd; |
637 | 637 | ||
638 | init_MUTEX (&usb_pcwd->sem); | 638 | mutex_init(&usb_pcwd->mtx); |
639 | usb_pcwd->udev = udev; | 639 | usb_pcwd->udev = udev; |
640 | usb_pcwd->interface = interface; | 640 | usb_pcwd->interface = interface; |
641 | usb_pcwd->interface_number = iface_desc->desc.bInterfaceNumber; | 641 | usb_pcwd->interface_number = iface_desc->desc.bInterfaceNumber; |
@@ -763,7 +763,7 @@ static void usb_pcwd_disconnect(struct usb_interface *interface) | |||
763 | usb_pcwd = usb_get_intfdata (interface); | 763 | usb_pcwd = usb_get_intfdata (interface); |
764 | usb_set_intfdata (interface, NULL); | 764 | usb_set_intfdata (interface, NULL); |
765 | 765 | ||
766 | down (&usb_pcwd->sem); | 766 | mutex_lock(&usb_pcwd->mtx); |
767 | 767 | ||
768 | /* Stop the timer before we leave */ | 768 | /* Stop the timer before we leave */ |
769 | if (!nowayout) | 769 | if (!nowayout) |
@@ -777,7 +777,7 @@ static void usb_pcwd_disconnect(struct usb_interface *interface) | |||
777 | misc_deregister(&usb_pcwd_temperature_miscdev); | 777 | misc_deregister(&usb_pcwd_temperature_miscdev); |
778 | unregister_reboot_notifier(&usb_pcwd_notifier); | 778 | unregister_reboot_notifier(&usb_pcwd_notifier); |
779 | 779 | ||
780 | up (&usb_pcwd->sem); | 780 | mutex_unlock(&usb_pcwd->mtx); |
781 | 781 | ||
782 | /* Delete the USB PCWD device */ | 782 | /* Delete the USB PCWD device */ |
783 | usb_pcwd_delete(usb_pcwd); | 783 | usb_pcwd_delete(usb_pcwd); |