summaryrefslogtreecommitdiffstats
path: root/include/linux/libps2.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2018-01-04 14:27:05 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2018-02-02 19:50:22 -0500
commit3a92dd331f90a33e0f0962b981577eb5078419c4 (patch)
tree48c5fba4c2d89ac39af71d2deeada87f0f291197 /include/linux/libps2.h
parentb28bad65c1fec47076ebee88b51b0dafa31f5065 (diff)
Input: libps2 - use BIT() for bitmask constants
Let's explicitly document bit numbers with BIT() macro. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'include/linux/libps2.h')
-rw-r--r--include/linux/libps2.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/libps2.h b/include/linux/libps2.h
index 04a5750f1e4e..646b581fea56 100644
--- a/include/linux/libps2.h
+++ b/include/linux/libps2.h
@@ -10,6 +10,7 @@
10 * the Free Software Foundation. 10 * the Free Software Foundation.
11 */ 11 */
12 12
13#include <linux/bitops.h>
13#include <linux/mutex.h> 14#include <linux/mutex.h>
14#include <linux/types.h> 15#include <linux/types.h>
15#include <linux/wait.h> 16#include <linux/wait.h>
@@ -23,11 +24,11 @@
23#define PS2_RET_NAK 0xfe 24#define PS2_RET_NAK 0xfe
24#define PS2_RET_ERR 0xfc 25#define PS2_RET_ERR 0xfc
25 26
26#define PS2_FLAG_ACK 1 /* Waiting for ACK/NAK */ 27#define PS2_FLAG_ACK BIT(0) /* Waiting for ACK/NAK */
27#define PS2_FLAG_CMD 2 /* Waiting for command to finish */ 28#define PS2_FLAG_CMD BIT(1) /* Waiting for a command to finish */
28#define PS2_FLAG_CMD1 4 /* Waiting for the first byte of command response */ 29#define PS2_FLAG_CMD1 BIT(2) /* Waiting for the first byte of command response */
29#define PS2_FLAG_WAITID 8 /* Command execiting is GET ID */ 30#define PS2_FLAG_WAITID BIT(3) /* Command executing is GET ID */
30#define PS2_FLAG_NAK 16 /* Last transmission was NAKed */ 31#define PS2_FLAG_NAK BIT(4) /* Last transmission was NAKed */
31 32
32struct ps2dev { 33struct ps2dev {
33 struct serio *serio; 34 struct serio *serio;