diff options
author | Alan Cox <alan@redhat.com> | 2008-07-16 16:53:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-20 20:12:34 -0400 |
commit | a352def21a642133758b868c71bee12ab34ad5c5 (patch) | |
tree | 95d0f7229f9e4afccdc6fbbf11f7f5c6dd83b0fd /drivers/net | |
parent | e1e5770bb63fb9d71619a68f52cb0ba4b2ae58a6 (diff) |
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 <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/hamradio/6pack.c | 2 | ||||
-rw-r--r-- | drivers/net/hamradio/mkiss.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/irtty-sir.c | 2 | ||||
-rw-r--r-- | drivers/net/ppp_async.c | 2 | ||||
-rw-r--r-- | drivers/net/ppp_synctty.c | 2 | ||||
-rw-r--r-- | drivers/net/slip.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/pc300_tty.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/x25_asy.c | 2 |
8 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index 9d5721287d6f..19dd0a61749c 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c | |||
@@ -783,7 +783,7 @@ static int sixpack_ioctl(struct tty_struct *tty, struct file *file, | |||
783 | return err; | 783 | return err; |
784 | } | 784 | } |
785 | 785 | ||
786 | static struct tty_ldisc sp_ldisc = { | 786 | static struct tty_ldisc_ops sp_ldisc = { |
787 | .owner = THIS_MODULE, | 787 | .owner = THIS_MODULE, |
788 | .magic = TTY_LDISC_MAGIC, | 788 | .magic = TTY_LDISC_MAGIC, |
789 | .name = "6pack", | 789 | .name = "6pack", |
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index 65166035aca0..c6ca47599fd4 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c | |||
@@ -969,7 +969,7 @@ out: | |||
969 | mkiss_put(ax); | 969 | mkiss_put(ax); |
970 | } | 970 | } |
971 | 971 | ||
972 | static struct tty_ldisc ax_ldisc = { | 972 | static struct tty_ldisc_ops ax_ldisc = { |
973 | .owner = THIS_MODULE, | 973 | .owner = THIS_MODULE, |
974 | .magic = TTY_LDISC_MAGIC, | 974 | .magic = TTY_LDISC_MAGIC, |
975 | .name = "mkiss", | 975 | .name = "mkiss", |
diff --git a/drivers/net/irda/irtty-sir.c b/drivers/net/irda/irtty-sir.c index e6f40b7f9041..9e33196f9459 100644 --- a/drivers/net/irda/irtty-sir.c +++ b/drivers/net/irda/irtty-sir.c | |||
@@ -533,7 +533,7 @@ static void irtty_close(struct tty_struct *tty) | |||
533 | 533 | ||
534 | /* ------------------------------------------------------- */ | 534 | /* ------------------------------------------------------- */ |
535 | 535 | ||
536 | static struct tty_ldisc irda_ldisc = { | 536 | static struct tty_ldisc_ops irda_ldisc = { |
537 | .magic = TTY_LDISC_MAGIC, | 537 | .magic = TTY_LDISC_MAGIC, |
538 | .name = "irda", | 538 | .name = "irda", |
539 | .flags = 0, | 539 | .flags = 0, |
diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c index f1a52def1241..451bdb57d6fc 100644 --- a/drivers/net/ppp_async.c +++ b/drivers/net/ppp_async.c | |||
@@ -378,7 +378,7 @@ ppp_asynctty_wakeup(struct tty_struct *tty) | |||
378 | } | 378 | } |
379 | 379 | ||
380 | 380 | ||
381 | static struct tty_ldisc ppp_ldisc = { | 381 | static struct tty_ldisc_ops ppp_ldisc = { |
382 | .owner = THIS_MODULE, | 382 | .owner = THIS_MODULE, |
383 | .magic = TTY_LDISC_MAGIC, | 383 | .magic = TTY_LDISC_MAGIC, |
384 | .name = "ppp", | 384 | .name = "ppp", |
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c index b8f0369a71e7..801d8f99d471 100644 --- a/drivers/net/ppp_synctty.c +++ b/drivers/net/ppp_synctty.c | |||
@@ -418,7 +418,7 @@ ppp_sync_wakeup(struct tty_struct *tty) | |||
418 | } | 418 | } |
419 | 419 | ||
420 | 420 | ||
421 | static struct tty_ldisc ppp_sync_ldisc = { | 421 | static struct tty_ldisc_ops ppp_sync_ldisc = { |
422 | .owner = THIS_MODULE, | 422 | .owner = THIS_MODULE, |
423 | .magic = TTY_LDISC_MAGIC, | 423 | .magic = TTY_LDISC_MAGIC, |
424 | .name = "pppsync", | 424 | .name = "pppsync", |
diff --git a/drivers/net/slip.c b/drivers/net/slip.c index 84af68fdb6c2..1d58991d395b 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c | |||
@@ -1301,7 +1301,7 @@ static int sl_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
1301 | #endif | 1301 | #endif |
1302 | /* VSV changes end */ | 1302 | /* VSV changes end */ |
1303 | 1303 | ||
1304 | static struct tty_ldisc sl_ldisc = { | 1304 | static struct tty_ldisc_ops sl_ldisc = { |
1305 | .owner = THIS_MODULE, | 1305 | .owner = THIS_MODULE, |
1306 | .magic = TTY_LDISC_MAGIC, | 1306 | .magic = TTY_LDISC_MAGIC, |
1307 | .name = "slip", | 1307 | .name = "slip", |
diff --git a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c index e03eef2f2282..c2c10c632260 100644 --- a/drivers/net/wan/pc300_tty.c +++ b/drivers/net/wan/pc300_tty.c | |||
@@ -688,9 +688,9 @@ static void cpc_tty_rx_work(struct work_struct *work) | |||
688 | if (cpc_tty->tty) { | 688 | if (cpc_tty->tty) { |
689 | ld = tty_ldisc_ref(cpc_tty->tty); | 689 | ld = tty_ldisc_ref(cpc_tty->tty); |
690 | if (ld) { | 690 | if (ld) { |
691 | if (ld->receive_buf) { | 691 | if (ld->ops->receive_buf) { |
692 | CPC_TTY_DBG("%s: call line disc. receive_buf\n",cpc_tty->name); | 692 | CPC_TTY_DBG("%s: call line disc. receive_buf\n",cpc_tty->name); |
693 | ld->receive_buf(cpc_tty->tty, (char *)(buf->data), &flags, buf->size); | 693 | ld->ops->receive_buf(cpc_tty->tty, (char *)(buf->data), &flags, buf->size); |
694 | } | 694 | } |
695 | tty_ldisc_deref(ld); | 695 | tty_ldisc_deref(ld); |
696 | } | 696 | } |
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 069f8bb0a99f..2a6c7a60756f 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c | |||
@@ -754,7 +754,7 @@ static void x25_asy_setup(struct net_device *dev) | |||
754 | dev->flags = IFF_NOARP; | 754 | dev->flags = IFF_NOARP; |
755 | } | 755 | } |
756 | 756 | ||
757 | static struct tty_ldisc x25_ldisc = { | 757 | static struct tty_ldisc_ops x25_ldisc = { |
758 | .owner = THIS_MODULE, | 758 | .owner = THIS_MODULE, |
759 | .magic = TTY_LDISC_MAGIC, | 759 | .magic = TTY_LDISC_MAGIC, |
760 | .name = "X.25", | 760 | .name = "X.25", |