summaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/serport.c
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2011-06-09 22:07:05 +0530
committerVinod Koul <vinod.koul@intel.com>2011-06-09 22:07:05 +0530
commit4b28d81a7ed82b906f1fdec0133d597b9cf57f85 (patch)
treefc722c2bafb704c0db35599392d8f8dddbb4e36d /drivers/input/serio/serport.c
parent114df7d66efd5c23561782f38e97c48fb30d4f5d (diff)
parent626a96db11698119a67eeda130488e869aa6f14e (diff)
downloadtalos-obmc-linux-4b28d81a7ed82b906f1fdec0133d597b9cf57f85.tar.gz
talos-obmc-linux-4b28d81a7ed82b906f1fdec0133d597b9cf57f85.zip
Merge remote branch 'gpio/ep93xx-dma' into next
Diffstat (limited to 'drivers/input/serio/serport.c')
-rw-r--r--drivers/input/serio/serport.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c
index f3698967edf6..8755f5f3ad37 100644
--- a/drivers/input/serio/serport.c
+++ b/drivers/input/serio/serport.c
@@ -120,21 +120,17 @@ static void serport_ldisc_close(struct tty_struct *tty)
* 'interrupt' routine.
*/
-static unsigned int serport_ldisc_receive(struct tty_struct *tty,
- const unsigned char *cp, char *fp, int count)
+static void serport_ldisc_receive(struct tty_struct *tty, const unsigned char *cp, char *fp, int count)
{
struct serport *serport = (struct serport*) tty->disc_data;
unsigned long flags;
unsigned int ch_flags;
- int ret = 0;
int i;
spin_lock_irqsave(&serport->lock, flags);
- if (!test_bit(SERPORT_ACTIVE, &serport->flags)) {
- ret = -EINVAL;
+ if (!test_bit(SERPORT_ACTIVE, &serport->flags))
goto out;
- }
for (i = 0; i < count; i++) {
switch (fp[i]) {
@@ -156,8 +152,6 @@ static unsigned int serport_ldisc_receive(struct tty_struct *tty,
out:
spin_unlock_irqrestore(&serport->lock, flags);
-
- return ret == 0 ? count : ret;
}
/*
OpenPOWER on IntegriCloud