summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/slcan.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-06-04 13:38:31 -0700
committerDavid S. Miller <davem@davemloft.net>2011-06-04 13:38:31 -0700
commite990b37b906b6137d353ef2a918e15e5763d70ec (patch)
treee802458ee43d4b0a2b6d39eb25929858ceb7fd61 /drivers/net/can/slcan.c
parent34624d6631b6b3a1df16407a847286bb6233a96b (diff)
parent23c79d31a3dd2602ee1a5ff31303b2d7a2d3c159 (diff)
downloadblackbird-op-linux-e990b37b906b6137d353ef2a918e15e5763d70ec.tar.gz
blackbird-op-linux-e990b37b906b6137d353ef2a918e15e5763d70ec.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/net/can/slcan.c')
-rw-r--r--drivers/net/can/slcan.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
index 75622d54581f..1b49df6b2470 100644
--- a/drivers/net/can/slcan.c
+++ b/drivers/net/can/slcan.c
@@ -425,17 +425,16 @@ static void slc_setup(struct net_device *dev)
* in parallel
*/
-static unsigned int slcan_receive_buf(struct tty_struct *tty,
+static void slcan_receive_buf(struct tty_struct *tty,
const unsigned char *cp, char *fp, int count)
{
struct slcan *sl = (struct slcan *) tty->disc_data;
- int bytes = count;
if (!sl || sl->magic != SLCAN_MAGIC || !netif_running(sl->dev))
- return -ENODEV;
+ return;
/* Read the characters out of the buffer */
- while (bytes--) {
+ while (count--) {
if (fp && *fp++) {
if (!test_and_set_bit(SLF_ERROR, &sl->flags))
sl->dev->stats.rx_errors++;
@@ -444,8 +443,6 @@ static unsigned int slcan_receive_buf(struct tty_struct *tty,
}
slcan_unesc(sl, *cp++);
}
-
- return count;
}
/************************************
OpenPOWER on IntegriCloud