PERFORCE change 175284 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Tue Mar 2 22:41:03 UTC 2010
http://p4web.freebsd.org/chv.cgi?CH=175284
Change 175284 by hselasky at hselasky_laptop001 on 2010/03/02 22:40:06
USB input (bugfix):
- make sure we don't reset
the sc_kbd_id to zero when
an Apple HID item is not present.
PR: usb/144414
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#46 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#46 (text+ko) ====
@@ -884,27 +884,30 @@
&hid_len, M_TEMP, uaa->info.bIfaceIndex);
if (err == 0) {
uint8_t apple_keys = 0;
+ uint8_t temp_id;
/* investigate if this is an Apple Keyboard */
if (hid_locate(hid_ptr, hid_len,
HID_USAGE2(HUP_CONSUMER, HUG_APPLE_EJECT),
hid_input, 0, &sc->sc_loc_apple_eject, &flags,
- &sc->sc_kbd_id)) {
+ &temp_id)) {
if (flags & HIO_VARIABLE)
sc->sc_flags |= UKBD_FLAG_APPLE_EJECT |
UKBD_FLAG_APPLE_SWAP;
DPRINTFN(1, "Found Apple eject-key\n");
apple_keys = 1;
+ sc->sc_kbd_id = temp_id;
}
if (hid_locate(hid_ptr, hid_len,
HID_USAGE2(0xFFFF, 0x0003),
hid_input, 0, &sc->sc_loc_apple_fn, &flags,
- &sc->sc_kbd_id)) {
+ &temp_id)) {
if (flags & HIO_VARIABLE)
sc->sc_flags |= UKBD_FLAG_APPLE_FN |
UKBD_FLAG_APPLE_SWAP;
DPRINTFN(1, "Found Apple FN-key\n");
apple_keys = 1;
+ sc->sc_kbd_id = temp_id;
}
if (apple_keys == 0) {
/*
More information about the p4-projects
mailing list