#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);
 }
 
 
 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);
 
    
    TRACE_M ("cleanup_module()");
 
-   status=tty_register_ldisc(N_R3964, NULL);
+   status=tty_unregister_ldisc(N_R3964);
    
    if(status!=0)
    {
 
 
 static void __exit serport_exit(void)
 {
-       tty_register_ldisc(N_MOUSE, NULL);
+       tty_unregister_ldisc(N_MOUSE);
 }
 
 module_init(serport_init);
 
 {
        int ret;
 
-       if ((ret = tty_register_ldisc(N_6PACK, NULL)))
+       if ((ret = tty_unregister_ldisc(N_6PACK)))
                printk(msg_unregfail, ret);
 }
 
 
        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);
 }
 
 
 {
        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);
        }
 
 
 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");
 }
 
 
 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");
 }
 
 
        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);
        }
 
        }
 
        kfree(x25_asy_devs);
-       tty_register_ldisc(N_X25, NULL);
+       tty_unregister_ldisc(N_X25);
 }
 
 module_init(init_x25_asy);
 
        /* 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);