summaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/serport.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-06-09 20:42:57 +0200
committerGrant Likely <grant.likely@secretlab.ca>2011-06-09 20:42:57 +0200
commite4c8308c852e6b3fa49215052a5b9e99597dee99 (patch)
treea44ef3377c17d69c2210e809ac2552540ce6f1fc /drivers/input/serio/serport.c
parentspi/topcliff_pch: DMA support (diff)
parentspi/ep93xx: add DMA support (diff)
downloadlinux-e4c8308c852e6b3fa49215052a5b9e99597dee99.tar.xz
linux-e4c8308c852e6b3fa49215052a5b9e99597dee99.zip
Merge branch 'ep93xx-dma' into spi/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;
}
/*