Date: Tue, 2 Mar 2010 22:41:03 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 175284 for review Message-ID: <201003022241.o22Mf3kY012994@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=175284 Change 175284 by hselasky@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) { /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003022241.o22Mf3kY012994>