diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-09-09 22:13:20 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-09-11 01:11:38 -0400 |
commit | b7802c5c1ea9563f3746bea09c214ccedc8600f4 (patch) | |
tree | 8feca41ff76258d05b8d4cc893b1a08e04a712f8 /drivers/input/mouse/psmouse.h | |
parent | f81134163fc785622f58af27363079ba1de7c7aa (diff) |
Input: psmouse - use boolean type
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/psmouse.h')
-rw-r--r-- | drivers/input/mouse/psmouse.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h index cca1744c2a08..e053bdd137ff 100644 --- a/drivers/input/mouse/psmouse.h +++ b/drivers/input/mouse/psmouse.h | |||
@@ -47,10 +47,10 @@ struct psmouse { | |||
47 | unsigned char pktcnt; | 47 | unsigned char pktcnt; |
48 | unsigned char pktsize; | 48 | unsigned char pktsize; |
49 | unsigned char type; | 49 | unsigned char type; |
50 | unsigned char acks_disable_command; | 50 | bool acks_disable_command; |
51 | unsigned int model; | 51 | unsigned int model; |
52 | unsigned long last; | 52 | unsigned long last; |
53 | unsigned long out_of_sync; | 53 | unsigned long out_of_sync_cnt; |
54 | unsigned long num_resyncs; | 54 | unsigned long num_resyncs; |
55 | enum psmouse_state state; | 55 | enum psmouse_state state; |
56 | char devname[64]; | 56 | char devname[64]; |
@@ -60,7 +60,7 @@ struct psmouse { | |||
60 | unsigned int resolution; | 60 | unsigned int resolution; |
61 | unsigned int resetafter; | 61 | unsigned int resetafter; |
62 | unsigned int resync_time; | 62 | unsigned int resync_time; |
63 | unsigned int smartscroll; /* Logitech only */ | 63 | bool smartscroll; /* Logitech only */ |
64 | 64 | ||
65 | psmouse_ret_t (*protocol_handler)(struct psmouse *psmouse); | 65 | psmouse_ret_t (*protocol_handler)(struct psmouse *psmouse); |
66 | void (*set_rate)(struct psmouse *psmouse, unsigned int rate); | 66 | void (*set_rate)(struct psmouse *psmouse, unsigned int rate); |
@@ -108,7 +108,7 @@ struct psmouse_attribute { | |||
108 | ssize_t (*show)(struct psmouse *psmouse, void *data, char *buf); | 108 | ssize_t (*show)(struct psmouse *psmouse, void *data, char *buf); |
109 | ssize_t (*set)(struct psmouse *psmouse, void *data, | 109 | ssize_t (*set)(struct psmouse *psmouse, void *data, |
110 | const char *buf, size_t count); | 110 | const char *buf, size_t count); |
111 | int protect; | 111 | bool protect; |
112 | }; | 112 | }; |
113 | #define to_psmouse_attr(a) container_of((a), struct psmouse_attribute, dattr) | 113 | #define to_psmouse_attr(a) container_of((a), struct psmouse_attribute, dattr) |
114 | 114 | ||
@@ -139,14 +139,14 @@ static struct psmouse_attribute psmouse_attr_##_name = { \ | |||
139 | __PSMOUSE_DEFINE_ATTR_VAR(_name, _mode, _data, _show, _set, _protect) | 139 | __PSMOUSE_DEFINE_ATTR_VAR(_name, _mode, _data, _show, _set, _protect) |
140 | 140 | ||
141 | #define PSMOUSE_DEFINE_ATTR(_name, _mode, _data, _show, _set) \ | 141 | #define PSMOUSE_DEFINE_ATTR(_name, _mode, _data, _show, _set) \ |
142 | __PSMOUSE_DEFINE_ATTR(_name, _mode, _data, _show, _set, 1) | 142 | __PSMOUSE_DEFINE_ATTR(_name, _mode, _data, _show, _set, true) |
143 | 143 | ||
144 | #define PSMOUSE_DEFINE_RO_ATTR(_name, _mode, _data, _show) \ | 144 | #define PSMOUSE_DEFINE_RO_ATTR(_name, _mode, _data, _show) \ |
145 | static ssize_t _show(struct psmouse *, void *, char *); \ | 145 | static ssize_t _show(struct psmouse *, void *, char *); \ |
146 | __PSMOUSE_DEFINE_ATTR_VAR(_name, _mode, _data, _show, NULL, 1) | 146 | __PSMOUSE_DEFINE_ATTR_VAR(_name, _mode, _data, _show, NULL, true) |
147 | 147 | ||
148 | #define PSMOUSE_DEFINE_WO_ATTR(_name, _mode, _data, _set) \ | 148 | #define PSMOUSE_DEFINE_WO_ATTR(_name, _mode, _data, _set) \ |
149 | static ssize_t _set(struct psmouse *, void *, const char *, size_t); \ | 149 | static ssize_t _set(struct psmouse *, void *, const char *, size_t); \ |
150 | __PSMOUSE_DEFINE_ATTR_VAR(_name, _mode, _data, NULL, _set, 1) | 150 | __PSMOUSE_DEFINE_ATTR_VAR(_name, _mode, _data, NULL, _set, true) |
151 | 151 | ||
152 | #endif /* _PSMOUSE_H */ | 152 | #endif /* _PSMOUSE_H */ |