diff options
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"); |