diff options
| author | Nathan Scott <nathans@sgi.com> | 2004-02-10 14:37:08 +1100 |
|---|---|---|
| committer | Nathan Scott <nathans@sgi.com> | 2004-02-10 14:37:08 +1100 |
| commit | 82e8290d09bf98c0112f7723509057acd6833fd2 (patch) | |
| tree | e1581cfbc1e3f2ffb3cc1659bed58d850c9a3afe /include | |
| parent | 71d024d501e5b076192f225fa2aca602be75fa3a (diff) | |
| parent | a6eebfd5c5e94e2d94a672407795e2d1a9045315 (diff) | |
Merge nathans@xfs.org:/export/hose/bkroot/xfs-linux-2.6
into sgi.com:/source2/xfs-linux-2.6
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/input.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/input.h b/include/linux/input.h index 59afa63abbb3..77ba731cfb3a 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -752,25 +752,28 @@ struct ff_effect { #define init_input_dev(dev) do { INIT_LIST_HEAD(&((dev)->h_list)); INIT_LIST_HEAD(&((dev)->node)); } while (0) #define SET_INPUT_KEYCODE(dev, scancode, val) \ - do { \ + ({ unsigned __old; \ switch (dev->keycodesize) { \ case 1: { \ u8 *k = (u8 *)dev->keycode; \ + __old = k[scancode]; \ k[scancode] = val; \ break; \ } \ case 2: { \ u16 *k = (u16 *)dev->keycode; \ + __old = k[scancode]; \ k[scancode] = val; \ break; \ } \ - case 4: { \ + default: { \ u32 *k = (u32 *)dev->keycode; \ + __old = k[scancode]; \ k[scancode] = val; \ break; \ } \ } \ - } while (0) + __old; }) struct input_dev { |
