Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Automatic merge of 'for-linus' branch from

rsync://rsync.kernel.org/pub/scm/linux/kernel/git/dtor/input

+97 -96
-20
drivers/input/gameport/Kconfig
··· 68 68 depends on PCI 69 69 70 70 endif 71 - 72 - # Yes, SOUND_GAMEPORT looks a bit odd. Yes, it ends up being turned on 73 - # in every .config. Please don't touch it. It is here to handle an 74 - # unusual dependency between GAMEPORT and sound drivers. 75 - # 76 - # Some sound drivers call gameport functions. If GAMEPORT is 77 - # not selected, empty stubs are provided for the functions and all is 78 - # well. 79 - # If GAMEPORT is built in, everything is fine. 80 - # If GAMEPORT is a module, however, it would need to be loaded for the 81 - # sound driver to be able to link properly. Therefore, the sound 82 - # driver must be a module as well in that case. Since there's no way 83 - # to express that directly in Kconfig, we use SOUND_GAMEPORT to 84 - # express it. SOUND_GAMEPORT boils down to "if GAMEPORT is 'm', 85 - # anything that depends on SOUND_GAMEPORT must be 'm' as well. if 86 - # GAMEPORT is 'y' or 'n', it can be anything". 87 - config SOUND_GAMEPORT 88 - tristate 89 - default m if GAMEPORT=m 90 - default y
+1 -1
drivers/input/joydev.c
··· 422 422 joydev->nkey++; 423 423 } 424 424 425 - for (i = 0; i < BTN_JOYSTICK - BTN_MISC + 1; i++) 425 + for (i = 0; i < BTN_JOYSTICK - BTN_MISC; i++) 426 426 if (test_bit(i + BTN_MISC, dev->keybit)) { 427 427 joydev->keymap[i] = joydev->nkey; 428 428 joydev->keypam[joydev->nkey] = i + BTN_MISC;
+5 -2
drivers/input/mouse/psmouse-base.c
··· 518 518 /* 519 519 * First, we check if it's a mouse. It should send 0x00 or 0x03 520 520 * in case of an IntelliMouse in 4-byte mode or 0x04 for IM Explorer. 521 + * Sunrex K8561 IR Keyboard/Mouse reports 0xff on second and subsequent 522 + * ID queries, probably due to a firmware bug. 521 523 */ 522 524 523 525 param[0] = 0xa5; 524 526 if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID)) 525 527 return -1; 526 528 527 - if (param[0] != 0x00 && param[0] != 0x03 && param[0] != 0x04) 529 + if (param[0] != 0x00 && param[0] != 0x03 && 530 + param[0] != 0x04 && param[0] != 0xff) 528 531 return -1; 529 532 530 533 /* ··· 975 972 return -EINVAL; 976 973 977 974 if (!strncmp(val, "any", 3)) { 978 - *((unsigned int *)kp->arg) = -1UL; 975 + *((unsigned int *)kp->arg) = -1U; 979 976 return 0; 980 977 } 981 978
+5 -34
drivers/input/mouse/synaptics.c
··· 143 143 return -1; 144 144 } 145 145 146 - static void print_ident(struct synaptics_data *priv) 147 - { 148 - printk(KERN_INFO "Synaptics Touchpad, model: %ld\n", SYN_ID_MODEL(priv->identity)); 149 - printk(KERN_INFO " Firmware: %ld.%ld\n", SYN_ID_MAJOR(priv->identity), 150 - SYN_ID_MINOR(priv->identity)); 151 - if (SYN_MODEL_ROT180(priv->model_id)) 152 - printk(KERN_INFO " 180 degree mounted touchpad\n"); 153 - if (SYN_MODEL_PORTRAIT(priv->model_id)) 154 - printk(KERN_INFO " portrait touchpad\n"); 155 - printk(KERN_INFO " Sensor: %ld\n", SYN_MODEL_SENSOR(priv->model_id)); 156 - if (SYN_MODEL_NEWABS(priv->model_id)) 157 - printk(KERN_INFO " new absolute packet format\n"); 158 - if (SYN_MODEL_PEN(priv->model_id)) 159 - printk(KERN_INFO " pen detection\n"); 160 - 161 - if (SYN_CAP_EXTENDED(priv->capabilities)) { 162 - printk(KERN_INFO " Touchpad has extended capability bits\n"); 163 - if (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap)) 164 - printk(KERN_INFO " -> %d multi-buttons, i.e. besides standard buttons\n", 165 - (int)(SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap))); 166 - if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities)) 167 - printk(KERN_INFO " -> middle button\n"); 168 - if (SYN_CAP_FOUR_BUTTON(priv->capabilities)) 169 - printk(KERN_INFO " -> four buttons\n"); 170 - if (SYN_CAP_MULTIFINGER(priv->capabilities)) 171 - printk(KERN_INFO " -> multifinger detection\n"); 172 - if (SYN_CAP_PALMDETECT(priv->capabilities)) 173 - printk(KERN_INFO " -> palm detection\n"); 174 - if (SYN_CAP_PASS_THROUGH(priv->capabilities)) 175 - printk(KERN_INFO " -> pass-through port\n"); 176 - } 177 - } 178 - 179 146 static int synaptics_query_hardware(struct psmouse *psmouse) 180 147 { 181 148 int retries = 0; ··· 633 666 634 667 priv->pkt_type = SYN_MODEL_NEWABS(priv->model_id) ? SYN_NEWABS : SYN_OLDABS; 635 668 636 - print_ident(priv); 669 + printk(KERN_INFO "Synaptics Touchpad, model: %ld, fw: %ld.%ld, id: %#lx, caps: %#lx/%#lx\n", 670 + SYN_ID_MODEL(priv->identity), 671 + SYN_ID_MAJOR(priv->identity), SYN_ID_MINOR(priv->identity), 672 + priv->model_id, priv->capabilities, priv->ext_cap); 673 + 637 674 set_input_params(&psmouse->dev, priv); 638 675 639 676 psmouse->protocol_handler = synaptics_process_byte;
+26 -6
drivers/input/serio/i8042-x86ia64io.h
··· 88 88 }; 89 89 90 90 /* 91 - * Some Fujitsu notebooks are ahving trouble with touhcpads if 91 + * Some Fujitsu notebooks are having trouble with touchpads if 92 92 * active multiplexing mode is activated. Luckily they don't have 93 93 * external PS/2 ports so we can safely disable it. 94 + * ... apparently some Toshibas don't like MUX mode either and 95 + * die horrible death on reboot. 94 96 */ 95 97 static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { 96 98 { ··· 117 115 }, 118 116 }, 119 117 { 118 + .ident = "Fujitsu Lifebook S6230", 119 + .matches = { 120 + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), 121 + DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S6230"), 122 + }, 123 + }, 124 + { 120 125 .ident = "Fujitsu T70H", 121 126 .matches = { 122 127 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), 123 128 DMI_MATCH(DMI_PRODUCT_NAME, "FMVLT70H"), 129 + }, 130 + }, 131 + { 132 + .ident = "Toshiba P10", 133 + .matches = { 134 + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), 135 + DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P10"), 124 136 }, 125 137 }, 126 138 { } ··· 231 215 232 216 static void i8042_pnp_exit(void) 233 217 { 234 - if (i8042_pnp_kbd_registered) 218 + if (i8042_pnp_kbd_registered) { 219 + i8042_pnp_kbd_registered = 0; 235 220 pnp_unregister_driver(&i8042_pnp_kbd_driver); 221 + } 236 222 237 - if (i8042_pnp_aux_registered) 223 + if (i8042_pnp_aux_registered) { 224 + i8042_pnp_aux_registered = 0; 238 225 pnp_unregister_driver(&i8042_pnp_aux_driver); 226 + } 239 227 } 240 228 241 229 static int i8042_pnp_init(void) ··· 247 227 int result_kbd, result_aux; 248 228 249 229 if (i8042_nopnp) { 250 - printk("i8042: PNP detection disabled\n"); 230 + printk(KERN_INFO "i8042: PNP detection disabled\n"); 251 231 return 0; 252 232 } 253 233 ··· 261 241 #if defined(__ia64__) 262 242 return -ENODEV; 263 243 #else 264 - printk(KERN_WARNING "PNP: No PS/2 controller found. Probing ports directly.\n"); 244 + printk(KERN_INFO "PNP: No PS/2 controller found. Probing ports directly.\n"); 265 245 return 0; 266 246 #endif 267 247 } ··· 285 265 i8042_pnp_kbd_irq = i8042_kbd_irq; 286 266 } 287 267 288 - if (result_aux > 0 && !i8042_pnp_aux_irq) { 268 + if (!i8042_pnp_aux_irq) { 289 269 printk(KERN_WARNING "PNP: PS/2 controller doesn't have AUX irq; using default %#x\n", i8042_aux_irq); 290 270 i8042_pnp_aux_irq = i8042_aux_irq; 291 271 }
+28 -22
drivers/input/serio/i8042.c
··· 698 698 i8042_interrupt(0, NULL, NULL); 699 699 } 700 700 701 + static int i8042_ctl_test(void) 702 + { 703 + unsigned char param; 704 + 705 + if (!i8042_reset) 706 + return 0; 707 + 708 + if (i8042_command(&param, I8042_CMD_CTL_TEST)) { 709 + printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n"); 710 + return -1; 711 + } 712 + 713 + if (param != I8042_RET_CTL_TEST) { 714 + printk(KERN_ERR "i8042.c: i8042 controller selftest failed. (%#x != %#x)\n", 715 + param, I8042_RET_CTL_TEST); 716 + return -1; 717 + } 718 + 719 + return 0; 720 + } 701 721 702 722 /* 703 723 * i8042_controller init initializes the i8042 controller, and, ··· 739 719 return -1; 740 720 } 741 721 742 - if (i8042_reset) { 743 - 744 - unsigned char param; 745 - 746 - if (i8042_command(&param, I8042_CMD_CTL_TEST)) { 747 - printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n"); 748 - return -1; 749 - } 750 - 751 - if (param != I8042_RET_CTL_TEST) { 752 - printk(KERN_ERR "i8042.c: i8042 controller selftest failed. (%#x != %#x)\n", 753 - param, I8042_RET_CTL_TEST); 754 - return -1; 755 - } 756 - } 722 + if (i8042_ctl_test()) 723 + return -1; 757 724 758 725 /* 759 726 * Save the CTR for restoral on unload / reboot. ··· 809 802 */ 810 803 static void i8042_controller_reset(void) 811 804 { 812 - unsigned char param; 813 - 814 805 /* 815 806 * Reset the controller if requested. 816 807 */ 817 808 818 - if (i8042_reset) 819 - if (i8042_command(&param, I8042_CMD_CTL_TEST)) 820 - printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n"); 809 + i8042_ctl_test(); 821 810 822 811 /* 823 812 * Disable MUX mode if present. ··· 925 922 if (level != RESUME_ENABLE) 926 923 return 0; 927 924 928 - if (i8042_controller_init()) { 929 - printk(KERN_ERR "i8042: resume failed\n"); 925 + if (i8042_ctl_test()) 926 + return -1; 927 + 928 + if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { 929 + printk(KERN_ERR "i8042: Can't write CTR\n"); 930 930 return -1; 931 931 } 932 932
+1 -2
drivers/input/touchscreen/gunze.c
··· 68 68 69 69 if (gunze->idx != GUNZE_MAX_LENGTH || gunze->data[5] != ',' || 70 70 (gunze->data[0] != 'T' && gunze->data[0] != 'R')) { 71 - gunze->data[10] = 0; 72 - printk(KERN_WARNING "gunze.c: bad packet: >%s<\n", gunze->data); 71 + printk(KERN_WARNING "gunze.c: bad packet: >%.*s<\n", GUNZE_MAX_LENGTH, gunze->data); 73 72 return; 74 73 } 75 74
+25 -3
include/linux/gameport.h
··· 67 67 void gameport_close(struct gameport *gameport); 68 68 void gameport_rescan(struct gameport *gameport); 69 69 70 + #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) 71 + 70 72 void __gameport_register_port(struct gameport *gameport, struct module *owner); 71 73 static inline void gameport_register_port(struct gameport *gameport) 72 74 { ··· 76 74 } 77 75 78 76 void gameport_unregister_port(struct gameport *gameport); 77 + 78 + void gameport_set_phys(struct gameport *gameport, const char *fmt, ...) 79 + __attribute__ ((format (printf, 2, 3))); 80 + 81 + #else 82 + 83 + static inline void gameport_register_port(struct gameport *gameport) 84 + { 85 + return; 86 + } 87 + 88 + static inline void gameport_unregister_port(struct gameport *gameport) 89 + { 90 + return; 91 + } 92 + 93 + static inline void gameport_set_phys(struct gameport *gameport, 94 + const char *fmt, ...) 95 + { 96 + return; 97 + } 98 + 99 + #endif 79 100 80 101 static inline struct gameport *gameport_allocate_port(void) 81 102 { ··· 116 91 { 117 92 strlcpy(gameport->name, name, sizeof(gameport->name)); 118 93 } 119 - 120 - void gameport_set_phys(struct gameport *gameport, const char *fmt, ...) 121 - __attribute__ ((format (printf, 2, 3))); 122 94 123 95 /* 124 96 * Use the following fucntions to manipulate gameport's per-port
+6 -6
sound/oss/Kconfig
··· 112 112 113 113 config SOUND_ES1370 114 114 tristate "Ensoniq AudioPCI (ES1370)" 115 - depends on SOUND_PRIME!=n && SOUND && PCI && SOUND_GAMEPORT 115 + depends on SOUND_PRIME!=n && SOUND && PCI 116 116 help 117 117 Say Y or M if you have a PCI sound card utilizing the Ensoniq 118 118 ES1370 chipset, such as Ensoniq's AudioPCI (non-97). To find ··· 125 125 126 126 config SOUND_ES1371 127 127 tristate "Creative Ensoniq AudioPCI 97 (ES1371)" 128 - depends on SOUND_PRIME!=n && SOUND && PCI && SOUND_GAMEPORT 128 + depends on SOUND_PRIME!=n && SOUND && PCI 129 129 help 130 130 Say Y or M if you have a PCI sound card utilizing the Ensoniq 131 131 ES1371 chipset, such as Ensoniq's AudioPCI97. To find out if ··· 138 138 139 139 config SOUND_ESSSOLO1 140 140 tristate "ESS Technology Solo1" 141 - depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT && PCI 141 + depends on SOUND_PRIME!=n && SOUND && PCI 142 142 help 143 143 Say Y or M if you have a PCI sound card utilizing the ESS Technology 144 144 Solo1 chip. To find out if your sound card uses a ··· 179 179 180 180 config SOUND_SONICVIBES 181 181 tristate "S3 SonicVibes" 182 - depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT 182 + depends on SOUND_PRIME!=n && SOUND 183 183 help 184 184 Say Y or M if you have a PCI sound card utilizing the S3 185 185 SonicVibes chipset. To find out if your sound card uses a ··· 226 226 227 227 config SOUND_TRIDENT 228 228 tristate "Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core" 229 - depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT 229 + depends on SOUND_PRIME!=n && SOUND 230 230 ---help--- 231 231 Say Y or M if you have a PCI sound card utilizing the Trident 232 232 4DWave-DX/NX chipset or your mother board chipset has SiS 7018 ··· 739 739 740 740 config SOUND_MAD16 741 741 tristate "OPTi MAD16 and/or Mozart based cards" 742 - depends on SOUND_OSS && SOUND_GAMEPORT 742 + depends on SOUND_OSS 743 743 ---help--- 744 744 Answer Y if your card has a Mozart (OAK OTI-601) or MAD16 (OPTi 745 745 82C928 or 82C929 or 82C931) audio interface chip. These chips are