diff options
author | Mariusz Kozlowski <m.kozlowski@tuxland.pl> | 2007-08-30 00:18:00 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2007-08-30 00:18:00 -0400 |
commit | 7460caf32a16866f9d8675aa7aefd7d82d1e23f7 (patch) | |
tree | 894d636ecfc531cc8bfd35843d44d5ca8df272df /drivers/input/serio | |
parent | d9f03831e7dc743ae25863c59f38884f5989ab39 (diff) |
Input: gscps2 - convert to use kzalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/serio')
-rw-r--r-- | drivers/input/serio/gscps2.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index 74f14e097789..3e99df6be084 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c | |||
@@ -340,8 +340,8 @@ static int __init gscps2_probe(struct parisc_device *dev) | |||
340 | if (dev->id.sversion == 0x96) | 340 | if (dev->id.sversion == 0x96) |
341 | hpa += GSC_DINO_OFFSET; | 341 | hpa += GSC_DINO_OFFSET; |
342 | 342 | ||
343 | ps2port = kmalloc(sizeof(struct gscps2port), GFP_KERNEL); | 343 | ps2port = kzalloc(sizeof(struct gscps2port), GFP_KERNEL); |
344 | serio = kmalloc(sizeof(struct serio), GFP_KERNEL); | 344 | serio = kzalloc(sizeof(struct serio), GFP_KERNEL); |
345 | if (!ps2port || !serio) { | 345 | if (!ps2port || !serio) { |
346 | ret = -ENOMEM; | 346 | ret = -ENOMEM; |
347 | goto fail_nomem; | 347 | goto fail_nomem; |
@@ -349,8 +349,6 @@ static int __init gscps2_probe(struct parisc_device *dev) | |||
349 | 349 | ||
350 | dev_set_drvdata(&dev->dev, ps2port); | 350 | dev_set_drvdata(&dev->dev, ps2port); |
351 | 351 | ||
352 | memset(ps2port, 0, sizeof(struct gscps2port)); | ||
353 | memset(serio, 0, sizeof(struct serio)); | ||
354 | ps2port->port = serio; | 352 | ps2port->port = serio; |
355 | ps2port->padev = dev; | 353 | ps2port->padev = dev; |
356 | ps2port->addr = ioremap_nocache(hpa, GSC_STATUS + 4); | 354 | ps2port->addr = ioremap_nocache(hpa, GSC_STATUS + 4); |