aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp_synctty.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-03-30 14:04:53 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-03-30 14:04:53 +1100
commit9ff9a26b786c35ee8d2a66222924a807ec851a9f (patch)
treedb432a17bccca1ca2c16907f0ee83ac449ed4012 /drivers/net/ppp_synctty.c
parentMerge commit 'kumar/next' into next (diff)
parentMerge branch 'bzip2-lzma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip (diff)
downloadlinux-dev-9ff9a26b786c35ee8d2a66222924a807ec851a9f.tar.xz
linux-dev-9ff9a26b786c35ee8d2a66222924a807ec851a9f.zip
Merge commit 'origin/master' into next
Manual merge of: arch/powerpc/include/asm/elf.h drivers/i2c/busses/i2c-mpc.c
Diffstat (limited to 'drivers/net/ppp_synctty.c')
-rw-r--r--drivers/net/ppp_synctty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c
index 1e892b7b1f8c..d2fa2db13586 100644
--- a/drivers/net/ppp_synctty.c
+++ b/drivers/net/ppp_synctty.c
@@ -206,6 +206,7 @@ ppp_sync_open(struct tty_struct *tty)
{
struct syncppp *ap;
int err;
+ int speed;
if (tty->ops->write == NULL)
return -EOPNOTSUPP;
@@ -234,6 +235,8 @@ ppp_sync_open(struct tty_struct *tty)
ap->chan.ops = &sync_ops;
ap->chan.mtu = PPP_MRU;
ap->chan.hdrlen = 2; /* for A/C bytes */
+ speed = tty_get_baud_rate(tty);
+ ap->chan.speed = speed;
err = ppp_register_channel(&ap->chan);
if (err)
goto out_free;
@@ -281,8 +284,7 @@ ppp_sync_close(struct tty_struct *tty)
ppp_unregister_channel(&ap->chan);
skb_queue_purge(&ap->rqueue);
- if (ap->tpkt)
- kfree_skb(ap->tpkt);
+ kfree_skb(ap->tpkt);
kfree(ap);
}