GIT 3cbd5b32cb625f5c0f1b1476d154fac873dd49ce git+ssh://master.kernel.org/pub/scm/linux/kernel/git/dtor/input.git commit 3cbd5b32cb625f5c0f1b1476d154fac873dd49ce Author: Anssi Hannula Date: Mon Jun 5 00:18:43 2006 -0400 Input: fix accuracy of fixp-arith.h Add the value of cos(90) = 0 to the table. This also moves the results so that sin(x) == sin(180-x) is true as expected. Signed-off-by: Anssi Hannula Signed-off-by: Andrew Morton Signed-off-by: Dmitry Torokhov commit fe65b97a5885a84baa103d7213754ff29e8f872f Author: Anssi Hannula Date: Mon Jun 5 00:18:21 2006 -0400 Input: iforce - use ENOSPC instead of ENOMEM Use -ENOSPC instead of -ENOMEM when the iforce device doesn't have enough free memory for the new effect. All other drivers are using -ENOSPC, so this makes the behaviour coherent. Signed-off-by: Anssi Hannula Signed-off-by: Andrew Morton Signed-off-by: Dmitry Torokhov commit 0f5e560e4523e15f33922de5becd024ccaaff76c Author: Andreas Mohr Date: Mon Jun 5 00:18:00 2006 -0400 Input: constify drivers/char/keyboard.c Signed-off-by: Andreas Mohr Signed-off-by: Andrew Morton Signed-off-by: Dmitry Torokhov --- Signed-off-by: Andrew Morton --- drivers/char/keyboard.c | 8 ++++---- drivers/input/joystick/iforce/iforce-ff.c | 8 ++++---- drivers/usb/input/fixp-arith.h | 15 ++++++--------- 3 files changed, 14 insertions(+), 17 deletions(-) diff -puN drivers/char/keyboard.c~git-input drivers/char/keyboard.c --- devel/drivers/char/keyboard.c~git-input 2006-06-09 15:17:06.000000000 -0700 +++ devel-akpm/drivers/char/keyboard.c 2006-06-09 15:17:06.000000000 -0700 @@ -672,7 +672,7 @@ static void k_dead2(struct vc_data *vc, */ static void k_dead(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs) { - static unsigned char ret_diacr[NR_DEAD] = {'`', '\'', '^', '~', '"', ',' }; + static const unsigned char ret_diacr[NR_DEAD] = {'`', '\'', '^', '~', '"', ',' }; value = ret_diacr[value]; k_deadunicode(vc, value, up_flag, regs); } @@ -709,8 +709,8 @@ static void k_cur(struct vc_data *vc, un static void k_pad(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs) { - static const char *pad_chars = "0123456789+-*/\015,.?()#"; - static const char *app_map = "pqrstuvwxylSRQMnnmPQS"; + static const char pad_chars[] = "0123456789+-*/\015,.?()#"; + static const char app_map[] = "pqrstuvwxylSRQMnnmPQS"; if (up_flag) return; /* no action, if this is a key release */ @@ -1035,7 +1035,7 @@ static void kbd_refresh_leds(struct inpu #define HW_RAW(dev) (test_bit(EV_MSC, dev->evbit) && test_bit(MSC_RAW, dev->mscbit) &&\ ((dev)->id.bustype == BUS_I8042) && ((dev)->id.vendor == 0x0001) && ((dev)->id.product == 0x0001)) -static unsigned short x86_keycodes[256] = +static const unsigned short x86_keycodes[256] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, diff -puN drivers/input/joystick/iforce/iforce-ff.c~git-input drivers/input/joystick/iforce/iforce-ff.c --- devel/drivers/input/joystick/iforce/iforce-ff.c~git-input 2006-06-09 15:17:06.000000000 -0700 +++ devel-akpm/drivers/input/joystick/iforce/iforce-ff.c 2006-06-09 15:17:06.000000000 -0700 @@ -47,7 +47,7 @@ static int make_magnitude_modifier(struc iforce->device_memory.start, iforce->device_memory.end, 2L, NULL, NULL)) { mutex_unlock(&iforce->mem_mutex); - return -ENOMEM; + return -ENOSPC; } mutex_unlock(&iforce->mem_mutex); } @@ -80,7 +80,7 @@ static int make_period_modifier(struct i iforce->device_memory.start, iforce->device_memory.end, 2L, NULL, NULL)) { mutex_unlock(&iforce->mem_mutex); - return -ENOMEM; + return -ENOSPC; } mutex_unlock(&iforce->mem_mutex); } @@ -120,7 +120,7 @@ static int make_envelope_modifier(struct iforce->device_memory.start, iforce->device_memory.end, 2L, NULL, NULL)) { mutex_unlock(&iforce->mem_mutex); - return -ENOMEM; + return -ENOSPC; } mutex_unlock(&iforce->mem_mutex); } @@ -157,7 +157,7 @@ static int make_condition_modifier(struc iforce->device_memory.start, iforce->device_memory.end, 2L, NULL, NULL)) { mutex_unlock(&iforce->mem_mutex); - return -ENOMEM; + return -ENOSPC; } mutex_unlock(&iforce->mem_mutex); } diff -puN drivers/usb/input/fixp-arith.h~git-input drivers/usb/input/fixp-arith.h --- devel/drivers/usb/input/fixp-arith.h~git-input 2006-06-09 15:17:06.000000000 -0700 +++ devel-akpm/drivers/usb/input/fixp-arith.h 2006-06-09 15:17:06.000000000 -0700 @@ -2,8 +2,6 @@ #define _FIXP_ARITH_H /* - * $$ - * * Simplistic fixed-point arithmetics. * Hmm, I'm probably duplicating some code :( * @@ -31,20 +29,20 @@ #include -// The type representing fixed-point values +/* The type representing fixed-point values */ typedef s16 fixp_t; #define FRAC_N 8 #define FRAC_MASK ((1<>= 1; _