PERFORCE change 166958 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Aug 3 07:12:47 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=166958
Change 166958 by hselasky at hselasky_laptop001 on 2009/08/03 07:12:40
IFC
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#26 integrate
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#26 (text+ko) ====
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/input/ukbd.c,v 1.15 2009/07/30 00:14:34 alfred Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/input/ukbd.c,v 1.16 2009/08/02 14:28:40 attilio Exp $");
/*-
@@ -760,7 +760,7 @@
uint16_t n;
uint16_t hid_len;
- mtx_assert(&Giant, MA_OWNED);
+ mtx_lock(&Giant);
kbd_init_struct(kbd, UKBD_DRIVER_NAME, KB_OTHER, unit, 0, 0, 0);
@@ -869,9 +869,6 @@
if (bootverbose) {
genkbd_diag(kbd, bootverbose);
}
- /* lock keyboard mutex */
-
- mtx_lock(&Giant);
/* start the keyboard */
@@ -894,7 +891,7 @@
struct ukbd_softc *sc = device_get_softc(dev);
int error;
- mtx_assert(&Giant, MA_OWNED);
+ mtx_lock(&Giant);
DPRINTF("\n");
@@ -931,6 +928,8 @@
usb_callout_drain(&sc->sc_callout);
+ mtx_unlock(&Giant);
+
DPRINTF("%s: disconnected\n",
device_get_nameunit(dev));
@@ -942,9 +941,9 @@
{
struct ukbd_softc *sc = device_get_softc(dev);
- mtx_assert(&Giant, MA_OWNED);
-
+ mtx_lock(&Giant);
ukbd_clear_state(&sc->sc_kbd);
+ mtx_unlock(&Giant);
return (0);
}
More information about the p4-projects
mailing list