Merge tag 'nfsd-5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
[linux-2.6-microblaze.git] / drivers / net / caif / caif_serial.c
index 4ffbfd5..2a7af61 100644 (file)
@@ -87,9 +87,9 @@ static void ldisc_tx_wakeup(struct tty_struct *tty);
 static inline void update_tty_status(struct ser_device *ser)
 {
        ser->tty_status =
-               ser->tty->stopped << 5 |
-               ser->tty->flow_stopped << 3 |
-               ser->tty->packet << 2;
+               ser->tty->flow.stopped << 5 |
+               ser->tty->flow.tco_stopped << 3 |
+               ser->tty->ctrl.packet << 2;
 }
 static inline void debugfs_init(struct ser_device *ser, struct tty_struct *tty)
 {
@@ -159,7 +159,7 @@ static inline void debugfs_tx(struct ser_device *ser, const u8 *data, int size)
 #endif
 
 static void ldisc_receive(struct tty_struct *tty, const u8 *data,
-                       char *flags, int count)
+                       const char *flags, int count)
 {
        struct sk_buff *skb = NULL;
        struct ser_device *ser;
@@ -380,6 +380,7 @@ static void ldisc_close(struct tty_struct *tty)
 /* The line discipline structure. */
 static struct tty_ldisc_ops caif_ldisc = {
        .owner =        THIS_MODULE,
+       .num =          N_CAIF,
        .name =         "n_caif",
        .open =         ldisc_open,
        .close =        ldisc_close,
@@ -429,7 +430,7 @@ static int __init caif_ser_init(void)
 {
        int ret;
 
-       ret = tty_register_ldisc(N_CAIF, &caif_ldisc);
+       ret = tty_register_ldisc(&caif_ldisc);
        if (ret < 0)
                pr_err("cannot register CAIF ldisc=%d err=%d\n", N_CAIF, ret);
 
@@ -444,7 +445,7 @@ static void __exit caif_ser_exit(void)
        spin_unlock(&ser_lock);
        ser_release(NULL);
        cancel_work_sync(&ser_release_work);
-       tty_unregister_ldisc(N_CAIF);
+       tty_unregister_ldisc(&caif_ldisc);
        debugfs_remove_recursive(debugfsdir);
 }