git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[pandora-kernel.git]
/
drivers
/
net
/
slip.c
diff --git
a/drivers/net/slip.c
b/drivers/net/slip.c
index
8ec1a9a
..
584809c
100644
(file)
--- a/
drivers/net/slip.c
+++ b/
drivers/net/slip.c
@@
-670,16
+670,17
@@
static void sl_setup(struct net_device *dev)
* in parallel
*/
* in parallel
*/
-static
void slip_receive_buf(struct tty_struct *tty, const unsigned char *cp
,
-
char *fp, int count)
+static
unsigned int slip_receive_buf(struct tty_struct *tty
,
+
const unsigned char *cp,
char *fp, int count)
{
struct slip *sl = tty->disc_data;
{
struct slip *sl = tty->disc_data;
+ int bytes = count;
if (!sl || sl->magic != SLIP_MAGIC || !netif_running(sl->dev))
if (!sl || sl->magic != SLIP_MAGIC || !netif_running(sl->dev))
- return;
+ return
-ENODEV
;
/* Read the characters out of the buffer */
/* Read the characters out of the buffer */
- while (
count
--) {
+ while (
bytes
--) {
if (fp && *fp++) {
if (!test_and_set_bit(SLF_ERROR, &sl->flags))
sl->dev->stats.rx_errors++;
if (fp && *fp++) {
if (!test_and_set_bit(SLF_ERROR, &sl->flags))
sl->dev->stats.rx_errors++;
@@
-693,6
+694,8
@@
static void slip_receive_buf(struct tty_struct *tty, const unsigned char *cp,
#endif
slip_unesc(sl, *cp++);
}
#endif
slip_unesc(sl, *cp++);
}
+
+ return count;
}
/************************************
}
/************************************