From owner-svn-src-all@FreeBSD.ORG Sat Jun 21 00:53:57 2014 Return-Path: Delivered-To: svn-src-all@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 8C422155; Sat, 21 Jun 2014 00:53:57 +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 5E8FA2CC7; Sat, 21 Jun 2014 00:53:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5L0rvKk038938; Sat, 21 Jun 2014 00:53:57 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5L0rvH7038936; Sat, 21 Jun 2014 00:53:57 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201406210053.s5L0rvH7038936@svn.freebsd.org> From: Justin Hibbits Date: Sat, 21 Jun 2014 00:53:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267697 - head/sys/dev/adb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 00:53:57 -0000 Author: jhibbits Date: Sat Jun 21 00:53:56 2014 New Revision: 267697 URL: http://svnweb.freebsd.org/changeset/base/267697 Log: No need to check if devd is running before posting an event. Modified: head/sys/dev/adb/adb_buttons.c head/sys/dev/adb/adb_kbd.c Modified: head/sys/dev/adb/adb_buttons.c ============================================================================== --- head/sys/dev/adb/adb_buttons.c Sat Jun 21 00:45:44 2014 (r267696) +++ head/sys/dev/adb/adb_buttons.c Sat Jun 21 00:53:56 2014 (r267697) @@ -118,37 +118,32 @@ abtn_receive_packet(device_t dev, u_char switch (cmd) { case 0x0a: /* decrease brightness */ - if (devctl_process_running()) - devctl_notify("PMU", "keys", "brightness", - "notify=down"); + devctl_notify("PMU", "keys", "brightness", + "notify=down"); break; case 0x09: /* increase brightness */ - if (devctl_process_running()) - devctl_notify("PMU", "keys", "brightness", "notify=up"); + devctl_notify("PMU", "keys", "brightness", "notify=up"); break; case 0x08: /* mute */ case 0x01: /* mute, AV hardware */ - if (devctl_process_running()) - devctl_notify("PMU", "keys", "mute", NULL); + devctl_notify("PMU", "keys", "mute", NULL); break; case 0x07: /* decrease volume */ case 0x02: /* decrease volume, AV hardware */ - if (devctl_process_running()) - devctl_notify("PMU", "keys", "volume", "notify=down"); + devctl_notify("PMU", "keys", "volume", "notify=down"); break; case 0x06: /* increase volume */ case 0x03: /* increase volume, AV hardware */ - if (devctl_process_running()) - devctl_notify("PMU", "keys", "volume", "notify=up"); + devctl_notify("PMU", "keys", "volume", "notify=up"); break; case 0x0c: /* mirror display key */ /* Need callback to do something with this */ break; case 0x0b: /* eject tray */ - if (devctl_process_running()) - devctl_notify("PMU", "keys", "eject", NULL); + devctl_notify("PMU", "keys", "eject", NULL); + break; case 0x7f: /* numlock */ /* Need callback to do something with this */ break; Modified: head/sys/dev/adb/adb_kbd.c ============================================================================== --- head/sys/dev/adb/adb_kbd.c Sat Jun 21 00:45:44 2014 (r267696) +++ head/sys/dev/adb/adb_kbd.c Sat Jun 21 00:53:56 2014 (r267697) @@ -424,7 +424,7 @@ adb_kbd_receive_packet(device_t dev, u_c mtx_lock(&sc->sc_mutex); /* 0x7f is always the power button */ - if (data[0] == 0x7f && devctl_process_running()) { + if (data[0] == 0x7f) { devctl_notify("PMU", "Button", "pressed", NULL); mtx_unlock(&sc->sc_mutex); return (0);