diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-10-19 02:40:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:42 -0400 |
commit | 7b19ada2ed3c1eccb9fe94d74b05e1428224663d (patch) | |
tree | a0c5975ce5236ff4023b92d431bd0a8fa321c6ce /drivers/input/tablet/wacom_sys.c | |
parent | d05be13bcc6ec615fb2e9556a9b85d52800669b6 (diff) |
get rid of input BIT* duplicate defines
get rid of input BIT* duplicate defines
use newly global defined macros for input layer. Also remove includes of
input.h from non-input sources only for BIT macro definiton. Define the
macro temporarily in local manner, all those local definitons will be
removed further in this patchset (to not break bisecting).
BIT macro will be globally defined (1<<x)
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <dtor@mail.ru>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Cc: <lenb@kernel.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Cc: <perex@suse.cz>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: <vernux@us.ibm.com>
Cc: <malattia@linux.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/input/tablet/wacom_sys.c')
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 58 |
1 files changed, 35 insertions, 23 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 064e123c9b76..d64b1ea136b3 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -140,48 +140,58 @@ static void wacom_close(struct input_dev *dev) | |||
140 | 140 | ||
141 | void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 141 | void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
142 | { | 142 | { |
143 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5); | 143 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_1) | |
144 | BIT_MASK(BTN_5); | ||
144 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); | 145 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); |
145 | } | 146 | } |
146 | 147 | ||
147 | void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 148 | void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
148 | { | 149 | { |
149 | input_dev->evbit[0] |= BIT(EV_MSC); | 150 | input_dev->evbit[0] |= BIT_MASK(EV_MSC); |
150 | input_dev->mscbit[0] |= BIT(MSC_SERIAL); | 151 | input_dev->mscbit[0] |= BIT_MASK(MSC_SERIAL); |
151 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER); | 152 | input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_FINGER); |
152 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_4); | 153 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_0) | |
154 | BIT_MASK(BTN_4); | ||
153 | } | 155 | } |
154 | 156 | ||
155 | void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 157 | void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
156 | { | 158 | { |
157 | input_dev->evbit[0] |= BIT(EV_REL); | 159 | input_dev->evbit[0] |= BIT_MASK(EV_REL); |
158 | input_dev->relbit[0] |= BIT(REL_WHEEL); | 160 | input_dev->relbit[0] |= BIT_MASK(REL_WHEEL); |
159 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE); | 161 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_LEFT) | |
160 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_STYLUS2); | 162 | BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE); |
163 | input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_RUBBER) | | ||
164 | BIT_MASK(BTN_TOOL_MOUSE) | BIT_MASK(BTN_STYLUS2); | ||
161 | input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0); | 165 | input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0); |
162 | } | 166 | } |
163 | 167 | ||
164 | void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 168 | void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
165 | { | 169 | { |
166 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER); | 170 | input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_FINGER); |
167 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3); | 171 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_0) | |
172 | BIT_MASK(BTN_1) | BIT_MASK(BTN_2) | BIT_MASK(BTN_3); | ||
168 | input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); | 173 | input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); |
169 | } | 174 | } |
170 | 175 | ||
171 | void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 176 | void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
172 | { | 177 | { |
173 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7); | 178 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_4) | |
179 | BIT_MASK(BTN_5) | BIT_MASK(BTN_6) | BIT_MASK(BTN_7); | ||
174 | input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); | 180 | input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); |
175 | } | 181 | } |
176 | 182 | ||
177 | void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 183 | void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
178 | { | 184 | { |
179 | input_dev->evbit[0] |= BIT(EV_MSC) | BIT(EV_REL); | 185 | input_dev->evbit[0] |= BIT_MASK(EV_MSC) | BIT_MASK(EV_REL); |
180 | input_dev->mscbit[0] |= BIT(MSC_SERIAL); | 186 | input_dev->mscbit[0] |= BIT_MASK(MSC_SERIAL); |
181 | input_dev->relbit[0] |= BIT(REL_WHEEL); | 187 | input_dev->relbit[0] |= BIT_MASK(REL_WHEEL); |
182 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | BIT(BTN_SIDE) | BIT(BTN_EXTRA); | 188 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_LEFT) | |
183 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_TOOL_BRUSH) | 189 | BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE) | |
184 | | BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_LENS) | BIT(BTN_STYLUS2); | 190 | BIT_MASK(BTN_SIDE) | BIT_MASK(BTN_EXTRA); |
191 | input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_RUBBER) | | ||
192 | BIT_MASK(BTN_TOOL_MOUSE) | BIT_MASK(BTN_TOOL_BRUSH) | | ||
193 | BIT_MASK(BTN_TOOL_PENCIL) | BIT_MASK(BTN_TOOL_AIRBRUSH) | | ||
194 | BIT_MASK(BTN_TOOL_LENS) | BIT_MASK(BTN_STYLUS2); | ||
185 | input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0); | 195 | input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0); |
186 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 1023, 0, 0); | 196 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 1023, 0, 0); |
187 | input_set_abs_params(input_dev, ABS_TILT_X, 0, 127, 0, 0); | 197 | input_set_abs_params(input_dev, ABS_TILT_X, 0, 127, 0, 0); |
@@ -192,12 +202,13 @@ void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | |||
192 | 202 | ||
193 | void input_dev_pl(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 203 | void input_dev_pl(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
194 | { | 204 | { |
195 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_STYLUS2) | BIT(BTN_TOOL_RUBBER); | 205 | input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_STYLUS2) | |
206 | BIT_MASK(BTN_TOOL_RUBBER); | ||
196 | } | 207 | } |
197 | 208 | ||
198 | void input_dev_pt(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 209 | void input_dev_pt(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
199 | { | 210 | { |
200 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER); | 211 | input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_RUBBER); |
201 | } | 212 | } |
202 | 213 | ||
203 | static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *id) | 214 | static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *id) |
@@ -243,12 +254,13 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i | |||
243 | input_dev->open = wacom_open; | 254 | input_dev->open = wacom_open; |
244 | input_dev->close = wacom_close; | 255 | input_dev->close = wacom_close; |
245 | 256 | ||
246 | input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS); | 257 | input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
247 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); | 258 | input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_PEN) | |
259 | BIT_MASK(BTN_TOUCH) | BIT_MASK(BTN_STYLUS); | ||
248 | input_set_abs_params(input_dev, ABS_X, 0, wacom_wac->features->x_max, 4, 0); | 260 | input_set_abs_params(input_dev, ABS_X, 0, wacom_wac->features->x_max, 4, 0); |
249 | input_set_abs_params(input_dev, ABS_Y, 0, wacom_wac->features->y_max, 4, 0); | 261 | input_set_abs_params(input_dev, ABS_Y, 0, wacom_wac->features->y_max, 4, 0); |
250 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom_wac->features->pressure_max, 0, 0); | 262 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom_wac->features->pressure_max, 0, 0); |
251 | input_dev->absbit[LONG(ABS_MISC)] |= BIT(ABS_MISC); | 263 | input_dev->absbit[BIT_WORD(ABS_MISC)] |= BIT_MASK(ABS_MISC); |
252 | 264 | ||
253 | wacom_init_input_dev(input_dev, wacom_wac); | 265 | wacom_init_input_dev(input_dev, wacom_wac); |
254 | 266 | ||