Date: Sat, 18 Jan 2014 22:32:48 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r260865 - projects/pmac_pmu/sys/dev/adb Message-ID: <201401182232.s0IMWmvK074856@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Sat Jan 18 22:32:48 2014 New Revision: 260865 URL: http://svnweb.freebsd.org/changeset/base/260865 Log: No need to check if devd is running before posting an event. Modified: projects/pmac_pmu/sys/dev/adb/adb_buttons.c projects/pmac_pmu/sys/dev/adb/adb_kbd.c Modified: projects/pmac_pmu/sys/dev/adb/adb_buttons.c ============================================================================== --- projects/pmac_pmu/sys/dev/adb/adb_buttons.c Sat Jan 18 21:57:38 2014 (r260864) +++ projects/pmac_pmu/sys/dev/adb/adb_buttons.c Sat Jan 18 22:32:48 2014 (r260865) @@ -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: projects/pmac_pmu/sys/dev/adb/adb_kbd.c ============================================================================== --- projects/pmac_pmu/sys/dev/adb/adb_kbd.c Sat Jan 18 21:57:38 2014 (r260864) +++ projects/pmac_pmu/sys/dev/adb/adb_kbd.c Sat Jan 18 22:32:48 2014 (r260865) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401182232.s0IMWmvK074856>