Skip to content

Commit

Permalink
[PATCH] Convert users to tty_unregister_ldisc()
Browse files Browse the repository at this point in the history
tty_register_ldisc(N_FOO, NULL) => tty_unregister_ldisc(N_FOO)

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Alexey Dobriyan authored and Linus Torvalds committed Jun 23, 2005
1 parent bfb0759 commit 64ccd71
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ static void __exit hci_uart_exit(void)
#endif

/* Release tty registration of line discipline */
if ((err = tty_register_ldisc(N_HCI, NULL)))
if ((err = tty_unregister_ldisc(N_HCI)))
BT_ERR("Can't unregister HCI line discipline (%d)", err);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/n_hdlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ static char hdlc_unregister_fail[] __exitdata =
static void __exit n_hdlc_exit(void)
{
/* Release tty registration of line discipline */
int status = tty_register_ldisc(N_HDLC, NULL);
int status = tty_unregister_ldisc(N_HDLC);

if (status)
printk(hdlc_unregister_fail, status);
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/n_r3964.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static void __exit r3964_exit(void)

TRACE_M ("cleanup_module()");

status=tty_register_ldisc(N_R3964, NULL);
status=tty_unregister_ldisc(N_R3964);

if(status!=0)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/serio/serport.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ static int __init serport_init(void)

static void __exit serport_exit(void)
{
tty_register_ldisc(N_MOUSE, NULL);
tty_unregister_ldisc(N_MOUSE);
}

module_init(serport_init);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/hamradio/6pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ static void __exit sixpack_exit_driver(void)
{
int ret;

if ((ret = tty_register_ldisc(N_6PACK, NULL)))
if ((ret = tty_unregister_ldisc(N_6PACK)))
printk(msg_unregfail, ret);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/hamradio/mkiss.c
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ static void __exit mkiss_exit_driver(void)
kfree(ax25_ctrls);
ax25_ctrls = NULL;

if ((i = tty_register_ldisc(N_AX25, NULL)))
if ((i = tty_unregister_ldisc(N_AX25)))
printk(KERN_ERR "mkiss: can't unregister line discipline (err = %d)\n", i);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/irda/irtty-sir.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ static void __exit irtty_sir_cleanup(void)
{
int err;

if ((err = tty_register_ldisc(N_IRDA, NULL))) {
if ((err = tty_unregister_ldisc(N_IRDA))) {
IRDA_ERROR("%s(), can't unregister line discipline (err = %d)\n",
__FUNCTION__, err);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ppp_async.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ static void async_lcp_peek(struct asyncppp *ap, unsigned char *data,

static void __exit ppp_async_cleanup(void)
{
if (tty_register_ldisc(N_PPP, NULL) != 0)
if (tty_unregister_ldisc(N_PPP) != 0)
printk(KERN_ERR "failed to unregister PPP line discipline\n");
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ppp_synctty.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ ppp_sync_input(struct syncppp *ap, const unsigned char *buf,
static void __exit
ppp_sync_cleanup(void)
{
if (tty_register_ldisc(N_SYNC_PPP, NULL) != 0)
if (tty_unregister_ldisc(N_SYNC_PPP) != 0)
printk(KERN_ERR "failed to unregister Sync PPP line discipline\n");
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/slip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,7 @@ static void __exit slip_exit(void)
kfree(slip_devs);
slip_devs = NULL;

if ((i = tty_register_ldisc(N_SLIP, NULL)))
if ((i = tty_unregister_ldisc(N_SLIP)))
{
printk(KERN_ERR "SLIP: can't unregister line discipline (err = %d)\n", i);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wan/x25_asy.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ static void __exit exit_x25_asy(void)
}

kfree(x25_asy_devs);
tty_register_ldisc(N_X25, NULL);
tty_unregister_ldisc(N_X25);
}

module_init(init_x25_asy);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/strip.c
Original file line number Diff line number Diff line change
Expand Up @@ -2828,7 +2828,7 @@ static void __exit strip_exit_driver(void)
/* Unregister with the /proc/net file here. */
proc_net_remove("strip");

if ((i = tty_register_ldisc(N_STRIP, NULL)))
if ((i = tty_unregister_ldisc(N_STRIP)))
printk(KERN_ERR "STRIP: can't unregister line discipline (err = %d)\n", i);

printk(signoff);
Expand Down

0 comments on commit 64ccd71

Please sign in to comment.