aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-31 00:55:22 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-31 00:55:22 -0400
commit644b55ce889edd37d6406df26e2d96d7a7390749 (patch)
tree9dc34216c5cf4c65d789fb2695289e09324558d4 /drivers/input/serio
parentfeabb06bd70551668540f2305047675667f5f60f (diff)
parentb3e2c70cd0d05fb6621521521fbd5debed57d753 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: psmouse - make dummy touchkit_ps2_detect() static Input: gscps2 - convert to use kzalloc Input: iforce - fix 'unused variable' warning Input: i8042 - fix retrun value of i8042_aux_test_irq Input: gpio_keys - remove duplicate includes
Diffstat (limited to 'drivers/input/serio')
-rw-r--r--drivers/input/serio/gscps2.c6
-rw-r--r--drivers/input/serio/i8042.c4
2 files changed, 5 insertions, 5 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);
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 3888dc307e0c..06b05dd22485 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -512,6 +512,7 @@ static irqreturn_t __devinit i8042_aux_test_irq(int irq, void *dev_id)
512{ 512{
513 unsigned long flags; 513 unsigned long flags;
514 unsigned char str, data; 514 unsigned char str, data;
515 int ret = 0;
515 516
516 spin_lock_irqsave(&i8042_lock, flags); 517 spin_lock_irqsave(&i8042_lock, flags);
517 str = i8042_read_status(); 518 str = i8042_read_status();
@@ -520,10 +521,11 @@ static irqreturn_t __devinit i8042_aux_test_irq(int irq, void *dev_id)
520 if (i8042_irq_being_tested && 521 if (i8042_irq_being_tested &&
521 data == 0xa5 && (str & I8042_STR_AUXDATA)) 522 data == 0xa5 && (str & I8042_STR_AUXDATA))
522 complete(&i8042_aux_irq_delivered); 523 complete(&i8042_aux_irq_delivered);
524 ret = 1;
523 } 525 }
524 spin_unlock_irqrestore(&i8042_lock, flags); 526 spin_unlock_irqrestore(&i8042_lock, flags);
525 527
526 return IRQ_HANDLED; 528 return IRQ_RETVAL(ret);
527} 529}
528 530
529/* 531/*