diff options
author | Justin Hibbits <jhibbits@FreeBSD.org> | 2014-06-21 00:53:56 +0000 |
---|---|---|
committer | Justin Hibbits <jhibbits@FreeBSD.org> | 2014-06-21 00:53:56 +0000 |
commit | 0b3a30a65e1302ddab2e543f8df92ad17f4bb5e0 (patch) | |
tree | 1490051fd39d70fa100258561c46ec7050ea1bba /sys/dev/adb | |
parent | 66edec08b009e1640199daec7824e9ad0f461b88 (diff) | |
download | src-0b3a30a65e1302ddab2e543f8df92ad17f4bb5e0.tar.gz src-0b3a30a65e1302ddab2e543f8df92ad17f4bb5e0.zip |
No need to check if devd is running before posting an event.
Notes
Notes:
svn path=/head/; revision=267697
Diffstat (limited to 'sys/dev/adb')
-rw-r--r-- | sys/dev/adb/adb_buttons.c | 21 | ||||
-rw-r--r-- | sys/dev/adb/adb_kbd.c | 2 |
2 files changed, 9 insertions, 14 deletions
diff --git a/sys/dev/adb/adb_buttons.c b/sys/dev/adb/adb_buttons.c index 92cdda169bae..b311b28daec0 100644 --- a/sys/dev/adb/adb_buttons.c +++ b/sys/dev/adb/adb_buttons.c @@ -118,37 +118,32 @@ abtn_receive_packet(device_t dev, u_char status, 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; diff --git a/sys/dev/adb/adb_kbd.c b/sys/dev/adb/adb_kbd.c index 76d4e882b139..2fe760932039 100644 --- a/sys/dev/adb/adb_kbd.c +++ b/sys/dev/adb/adb_kbd.c @@ -424,7 +424,7 @@ adb_kbd_receive_packet(device_t dev, u_char status, 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); |