mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
tty: Ldisc revamp
Move the line disciplines towards a conventional ->ops arrangement. For the moment the actual 'tty_ldisc' struct in the tty is kept as part of the tty struct but this can then be changed if it turns out that when it all settles down we want to refcount ldiscs separately to the tty. Pull the ldisc code out of /proc and put it with our ldisc code. Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
e1e5770bb6
commit
a352def21a
32 changed files with 286 additions and 246 deletions
|
|
@ -466,7 +466,7 @@ static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb)
|
|||
ld = tty_ldisc_ref(mp->tty);
|
||||
if (ld == NULL)
|
||||
return -1;
|
||||
if (ld->receive_buf == NULL) {
|
||||
if (ld->ops->receive_buf == NULL) {
|
||||
#if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS)
|
||||
printk(KERN_DEBUG "capi: ldisc has no receive_buf function\n");
|
||||
#endif
|
||||
|
|
@ -501,7 +501,7 @@ static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb)
|
|||
printk(KERN_DEBUG "capi: DATA_B3_RESP %u len=%d => ldisc\n",
|
||||
datahandle, skb->len);
|
||||
#endif
|
||||
ld->receive_buf(mp->tty, skb->data, NULL, skb->len);
|
||||
ld->ops->receive_buf(mp->tty, skb->data, NULL, skb->len);
|
||||
kfree_skb(skb);
|
||||
tty_ldisc_deref(ld);
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -766,7 +766,7 @@ gigaset_tty_wakeup(struct tty_struct *tty)
|
|||
cs_put(cs);
|
||||
}
|
||||
|
||||
static struct tty_ldisc gigaset_ldisc = {
|
||||
static struct tty_ldisc_ops gigaset_ldisc = {
|
||||
.owner = THIS_MODULE,
|
||||
.magic = TTY_LDISC_MAGIC,
|
||||
.name = "ser_gigaset",
|
||||
|
|
|
|||
Loading…
Reference in a new issue