diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-02 15:49:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-02 15:49:19 -0400 |
commit | 9c8680e2cfbb60d5075f8caaf9d98276120bcc78 (patch) | |
tree | 1957cff26a46271d5b63a3c209629ddd7f9fe124 /drivers/input/mouse/synaptics.c | |
parent | f900e5824a44ab65437b4f7e7c610b72f94820c5 (diff) | |
parent | b9ec4e109d7a342e83e1210e05797222e36555c3 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
* master.kernel.org:/pub/scm/linux/kernel/git/dtor/input: (26 commits)
Input: add support for Braille devices
Input: synaptics - limit rate to 40pps on Toshiba Protege M300
Input: gamecon - add SNES mouse support
Input: make modalias code respect allowed buffer size
Input: convert /proc handling to seq_file
Input: limit attributes' output to PAGE_SIZE
Input: gameport - fix memory leak
Input: serio - fix memory leak
Input: zaurus keyboard driver updates
Input: i8042 - fix logic around pnp_register_driver()
Input: ns558 - fix logic around pnp_register_driver()
Input: pcspkr - separate device and driver registration
Input: atkbd - allow disabling on X86_PC (if EMBEDDED)
Input: atkbd - disable softrepeat for dumb keyboards
Input: atkbd - fix complaints about 'releasing unknown key 0x7f'
Input: HID - fix duplicate key mapping for Logitech UltraX remote
Input: use kzalloc() throughout the code
Input: fix input_free_device() implementation
Input: initialize serio and gameport at subsystem level
Input: uinput - semaphore to mutex conversion
...
Diffstat (limited to 'drivers/input/mouse/synaptics.c')
-rw-r--r-- | drivers/input/mouse/synaptics.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 2051bec2c394..ad5d0a85e960 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -247,14 +247,12 @@ static void synaptics_pt_create(struct psmouse *psmouse) | |||
247 | { | 247 | { |
248 | struct serio *serio; | 248 | struct serio *serio; |
249 | 249 | ||
250 | serio = kmalloc(sizeof(struct serio), GFP_KERNEL); | 250 | serio = kzalloc(sizeof(struct serio), GFP_KERNEL); |
251 | if (!serio) { | 251 | if (!serio) { |
252 | printk(KERN_ERR "synaptics: not enough memory to allocate pass-through port\n"); | 252 | printk(KERN_ERR "synaptics: not enough memory to allocate pass-through port\n"); |
253 | return; | 253 | return; |
254 | } | 254 | } |
255 | 255 | ||
256 | memset(serio, 0, sizeof(struct serio)); | ||
257 | |||
258 | serio->id.type = SERIO_PS_PSTHRU; | 256 | serio->id.type = SERIO_PS_PSTHRU; |
259 | strlcpy(serio->name, "Synaptics pass-through", sizeof(serio->name)); | 257 | strlcpy(serio->name, "Synaptics pass-through", sizeof(serio->name)); |
260 | strlcpy(serio->phys, "synaptics-pt/serio0", sizeof(serio->name)); | 258 | strlcpy(serio->phys, "synaptics-pt/serio0", sizeof(serio->name)); |
@@ -605,14 +603,21 @@ static struct dmi_system_id toshiba_dmi_table[] = { | |||
605 | .ident = "Toshiba Satellite", | 603 | .ident = "Toshiba Satellite", |
606 | .matches = { | 604 | .matches = { |
607 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 605 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
608 | DMI_MATCH(DMI_PRODUCT_NAME , "Satellite"), | 606 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite"), |
609 | }, | 607 | }, |
610 | }, | 608 | }, |
611 | { | 609 | { |
612 | .ident = "Toshiba Dynabook", | 610 | .ident = "Toshiba Dynabook", |
613 | .matches = { | 611 | .matches = { |
614 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 612 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
615 | DMI_MATCH(DMI_PRODUCT_NAME , "dynabook"), | 613 | DMI_MATCH(DMI_PRODUCT_NAME, "dynabook"), |
614 | }, | ||
615 | }, | ||
616 | { | ||
617 | .ident = "Toshiba Portege M300", | ||
618 | .matches = { | ||
619 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | ||
620 | DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M300"), | ||
616 | }, | 621 | }, |
617 | }, | 622 | }, |
618 | { } | 623 | { } |
@@ -623,10 +628,9 @@ int synaptics_init(struct psmouse *psmouse) | |||
623 | { | 628 | { |
624 | struct synaptics_data *priv; | 629 | struct synaptics_data *priv; |
625 | 630 | ||
626 | psmouse->private = priv = kmalloc(sizeof(struct synaptics_data), GFP_KERNEL); | 631 | psmouse->private = priv = kzalloc(sizeof(struct synaptics_data), GFP_KERNEL); |
627 | if (!priv) | 632 | if (!priv) |
628 | return -1; | 633 | return -1; |
629 | memset(priv, 0, sizeof(struct synaptics_data)); | ||
630 | 634 | ||
631 | if (synaptics_query_hardware(psmouse)) { | 635 | if (synaptics_query_hardware(psmouse)) { |
632 | printk(KERN_ERR "Unable to query Synaptics hardware.\n"); | 636 | printk(KERN_ERR "Unable to query Synaptics hardware.\n"); |