From owner-svn-src-user@FreeBSD.ORG Tue Jul 15 10:34:22 2014 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F83D86E; Tue, 15 Jul 2014 10:34:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D76C426C8; Tue, 15 Jul 2014 10:34:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6FAYLOV084599; Tue, 15 Jul 2014 10:34:21 GMT (envelope-from jceel@svn.freebsd.org) Received: (from jceel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6FAYL6a084598; Tue, 15 Jul 2014 10:34:21 GMT (envelope-from jceel@svn.freebsd.org) Message-Id: <201407151034.s6FAYL6a084598@svn.freebsd.org> From: Jakub Wojciech Klama Date: Tue, 15 Jul 2014 10:34:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r268665 - user/jceel/soc2014_evdev/head/sys/dev/usb/input X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 10:34:22 -0000 Author: jceel Date: Tue Jul 15 10:34:21 2014 New Revision: 268665 URL: http://svnweb.freebsd.org/changeset/base/268665 Log: Properly #ifdef evdev-related code. Modified: user/jceel/soc2014_evdev/head/sys/dev/usb/input/ukbd.c Modified: user/jceel/soc2014_evdev/head/sys/dev/usb/input/ukbd.c ============================================================================== --- user/jceel/soc2014_evdev/head/sys/dev/usb/input/ukbd.c Tue Jul 15 10:07:05 2014 (r268664) +++ user/jceel/soc2014_evdev/head/sys/dev/usb/input/ukbd.c Tue Jul 15 10:34:21 2014 (r268665) @@ -172,7 +172,7 @@ struct ukbd_softc { struct usb_xfer *sc_xfer[UKBD_N_TRANSFER]; #ifdef EVDEV struct evdev_dev *sc_evdev; -#endif /* EVDEV */ +#endif uint32_t sc_ntime[UKBD_NKEYCODE]; uint32_t sc_otime[UKBD_NKEYCODE]; @@ -382,9 +382,10 @@ static device_probe_t ukbd_probe; static device_attach_t ukbd_attach; static device_detach_t ukbd_detach; static device_resume_t ukbd_resume; -static evdev_event_t ukbd_ev_event; #ifdef EVDEV +static evdev_event_t ukbd_ev_event; + static struct evdev_methods ukbd_evdev_methods = { .ev_open = NULL, .ev_close = NULL, @@ -1425,6 +1426,7 @@ ukbd_resume(device_t dev) return (0); } +#ifdef EVDEV static void ukbd_ev_event(struct evdev_dev *evdev, void *softc, uint16_t type, uint16_t code, int32_t value) @@ -1437,6 +1439,7 @@ ukbd_ev_event(struct evdev_dev *evdev, v if (type == EV_REP && code == REP_PERIOD) sc->sc_kbd.kb_delay2 = value; } +#endif /* early keyboard probe, not supported */ static int @@ -1937,10 +1940,12 @@ ukbd_ioctl_locked(keyboard_t *kbd, u_lon else kbd->kb_delay1 = ((int *)arg)[0]; kbd->kb_delay2 = ((int *)arg)[1]; +#ifdef EVDEV evdev_set_repeat_params(sc->sc_evdev, REP_DELAY, kbd->kb_delay1); evdev_set_repeat_params(sc->sc_evdev, REP_PERIOD, kbd->kb_delay2); +#endif return (0); #if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ @@ -2080,7 +2085,9 @@ ukbd_set_leds(struct ukbd_softc *sc, uin static int ukbd_set_typematic(keyboard_t *kbd, int code) { +#ifdef EVDEV struct ukbd_softc *sc = kbd->kb_data; +#endif static const int delays[] = {250, 500, 750, 1000}; static const int rates[] = {34, 38, 42, 46, 50, 55, 59, 63, 68, 76, 84, 92, 100, 110, 118, 126, @@ -2092,8 +2099,10 @@ ukbd_set_typematic(keyboard_t *kbd, int } kbd->kb_delay1 = delays[(code >> 5) & 3]; kbd->kb_delay2 = rates[code & 0x1f]; +#ifdef EVDEV evdev_set_repeat_params(sc->sc_evdev, REP_DELAY, kbd->kb_delay1); evdev_set_repeat_params(sc->sc_evdev, REP_PERIOD, kbd->kb_delay2); +#endif return (0); }