diff -Naur dgrp-1.9.40.orig/driver/2.6.27/dgrp_common.c dgrp-1.9.40.patched/driver/2.6.27/dgrp_common.c
--- dgrp-1.9.40.orig/driver/2.6.27/dgrp_common.c	2023-03-07 10:54:26.818594277 +0000
+++ dgrp-1.9.40.patched/driver/2.6.27/dgrp_common.c	2023-03-07 11:19:40.086622368 +0000
@@ -194,9 +194,15 @@
  */
 int dgrp_sleep(ulong ticks)
 {
-	current->state = TASK_INTERRUPTIBLE;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0))
+        current->state = TASK_INTERRUPTIBLE;
 	schedule_timeout(ticks);
 	current->state = TASK_RUNNING;
+#else
+        WRITE_ONCE(current->__state, TASK_INTERRUPTIBLE);
+	schedule_timeout(ticks);
+        WRITE_ONCE(current->__state, TASK_RUNNING);
+#endif
 	return signal_pending(current);
 }
 
@@ -613,16 +619,18 @@
  *****************************************************************************/
 
 #include <linux/proc_fs.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
 struct proc_dir_entry *dgrp_create_proc_entry(const char *name, mode_t mode,
-						struct proc_dir_entry *parent)
+						struct proc_dir_entry *parent,
+						struct file_operations *fops,
+						void *data)
 {
-	return create_proc_entry(name, mode, parent);
+	return proc_create_data(name, mode, parent, fops, data);
 }
 #else
 struct proc_dir_entry *dgrp_create_proc_entry(const char *name, mode_t mode,
 						struct proc_dir_entry *parent,
-						struct file_operations *fops,
+						struct proc_ops *fops,
 						void *data)
 {
 	return proc_create_data(name, mode, parent, fops, data);
diff -Naur dgrp-1.9.40.orig/driver/2.6.27/dgrp_dpa_ops.c dgrp-1.9.40.patched/driver/2.6.27/dgrp_dpa_ops.c
--- dgrp-1.9.40.orig/driver/2.6.27/dgrp_dpa_ops.c	2023-03-07 11:20:39.302623468 +0000
+++ dgrp-1.9.40.patched/driver/2.6.27/dgrp_dpa_ops.c	2023-03-08 08:01:34.915283344 +0000
@@ -88,6 +88,7 @@
 #endif
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
 static struct file_operations dpa_ops = {
 	.owner   =  THIS_MODULE,	/* owner	*/
 	.read    =  dgrp_dpa_read,	/* read		*/
@@ -97,6 +98,16 @@
 	.open    =  dgrp_dpa_open,	/* open		*/
 	.release =  dgrp_dpa_release,	/* release	*/
 };
+#else
+static struct proc_ops dpa_ops = {
+	.proc_read    =  dgrp_dpa_read,	/* read		*/
+	.proc_write   =  dgrp_dpa_write,	/* write	*/
+	.proc_poll    =  dgrp_dpa_select,	/* poll or select */
+	.proc_ioctl =  dgrp_dpa_ioctl,	/* ioctl	*/
+	.proc_open    =  dgrp_dpa_open,	/* open		*/
+	.proc_release =  dgrp_dpa_release,	/* release	*/
+};
+#endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
 static struct inode_operations dpa_inode_ops = {
@@ -318,15 +329,10 @@
 	/*
 	 *  Get the node pointer, and fail if it doesn't exist.
 	 */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
-	de = PDE(inode);
-	if (!de) {
-		rtn = -ENXIO;
-		goto done;
-	}
-	nd = (struct nd_struct *)de->data;
-#else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
 	nd = (struct nd_struct *)PDE_DATA(inode);
+#else
+	nd = (struct nd_struct *)pde_data(inode);
 #endif
 	if (!nd) {
 		rtn = -ENXIO;
diff -Naur dgrp-1.9.40.orig/driver/2.6.27/dgrp_driver.c dgrp-1.9.40.patched/driver/2.6.27/dgrp_driver.c
--- dgrp-1.9.40.orig/driver/2.6.27/dgrp_driver.c	2023-03-08 10:26:16.483444503 +0000
+++ dgrp-1.9.40.patched/driver/2.6.27/dgrp_driver.c	2023-03-08 08:07:55.763290414 +0000
@@ -60,7 +60,9 @@
 
 MODULE_AUTHOR("Digi International, http://www.digi.com");
 MODULE_DESCRIPTION("RealPort driver for Digi's ethernet-based serial connectivity product line");
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0)
 MODULE_SUPPORTED_DEVICE("dgrp");
+#endif
 
 
 /*
diff -Naur dgrp-1.9.40.orig/driver/2.6.27/dgrp_mon_ops.c dgrp-1.9.40.patched/driver/2.6.27/dgrp_mon_ops.c
--- dgrp-1.9.40.orig/driver/2.6.27/dgrp_mon_ops.c	2023-03-07 11:00:24.310600913 +0000
+++ dgrp-1.9.40.patched/driver/2.6.27/dgrp_mon_ops.c	2023-03-08 08:12:35.111295599 +0000
@@ -86,6 +86,7 @@
 #endif
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
 static struct file_operations mon_ops = {
 	.owner   = THIS_MODULE,		/* owner   */
 	.read    = dgrp_mon_read,	/* read	   */
@@ -94,6 +95,15 @@
 	.open    = dgrp_mon_open,	/* open    */
 	.release = dgrp_mon_release,	/* release */
 };
+#else
+static struct proc_ops mon_ops = {
+	.proc_read    = dgrp_mon_read,	/* read	   */
+	.proc_write   = dgrp_mon_write,	/* write   */
+	.proc_ioctl = dgrp_mon_ioctl,	/* ioctl   */
+	.proc_open    = dgrp_mon_open,	/* open    */
+	.proc_release = dgrp_mon_release,	/* release */
+};
+#endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
 static struct inode_operations mon_inode_ops = {
@@ -281,15 +291,10 @@
 	/*
 	 *  Get the node pointer, and fail if it doesn't exist.
 	 */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
-	de = PDE(inode);
-	if (!de) {
-		rtn = -ENXIO;
-		goto done;
-	}
-	nd = (struct nd_struct *)de->data;
-#else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
 	nd = (struct nd_struct *)PDE_DATA(inode);
+#else
+	nd = (struct nd_struct *)pde_data(inode);
 #endif
 	if (!nd) {
 		rtn = -ENXIO;
diff -Naur dgrp-1.9.40.orig/driver/2.6.27/dgrp_net_ops.c dgrp-1.9.40.patched/driver/2.6.27/dgrp_net_ops.c
--- dgrp-1.9.40.orig/driver/2.6.27/dgrp_net_ops.c	2023-03-07 11:08:00.422609380 +0000
+++ dgrp-1.9.40.patched/driver/2.6.27/dgrp_net_ops.c	2023-03-08 08:16:31.847299994 +0000
@@ -128,6 +128,7 @@
 #endif
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
 static struct file_operations net_ops = {
 	.owner   =  THIS_MODULE,	/* owner   */
 	.read    =  dgrp_net_read,	/* read	   */
@@ -137,6 +138,16 @@
 	.open    =  dgrp_net_open,	/* open    */
 	.release =  dgrp_net_release,	/* release */
 };
+#else
+static struct proc_ops net_ops = {
+	.proc_read    =  dgrp_net_read,	/* read	   */
+	.proc_write   =  dgrp_net_write,	/* write   */
+	.proc_poll    =  dgrp_net_select,	/* poll or select */
+	.proc_ioctl =  dgrp_net_ioctl,	/* ioctl   */
+	.proc_open    =  dgrp_net_open,	/* open    */
+	.proc_release =  dgrp_net_release,	/* release */
+};
+#endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
 static struct inode_operations net_inode_ops = {
@@ -1470,17 +1481,10 @@
 	/*
 	 *  Get the node pointer, and fail if it doesn't exist.
 	 */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
-	de = PDE(inode);
-	if (!de) {
-		rtn = -ENXIO;
-		goto done;
-	}
-
-	nd = (struct nd_struct *) de->data;
-#else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
 	nd = (struct nd_struct *) PDE_DATA(inode);
-
+#else
+	nd = (struct nd_struct *) pde_data(inode);
 #endif
 	if (!nd) {
 		rtn = -ENXIO;
diff -Naur dgrp-1.9.40.orig/driver/2.6.27/dgrp_ports_ops.c dgrp-1.9.40.patched/driver/2.6.27/dgrp_ports_ops.c
--- dgrp-1.9.40.orig/driver/2.6.27/dgrp_ports_ops.c	2023-03-07 11:02:56.626603741 +0000
+++ dgrp-1.9.40.patched/driver/2.6.27/dgrp_ports_ops.c	2023-03-08 08:19:46.727303612 +0000
@@ -83,6 +83,7 @@
 #endif
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
 static struct file_operations ports_ops = {
 	.owner   =   THIS_MODULE,	/* owner   */
 	.read    =   dgrp_ports_read,	/* read	   */
@@ -90,6 +91,14 @@
 	.open    =   dgrp_ports_open,	/* open    */
 	.release =   dgrp_ports_release	/* release */
 };
+#else
+static struct proc_ops ports_ops = {
+	.proc_read    =   dgrp_ports_read,	/* read	   */
+	.proc_write   =   dgrp_ports_write,	/* write   */
+	.proc_open    =   dgrp_ports_open,	/* open    */
+	.proc_release =   dgrp_ports_release	/* release */
+};
+#endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
 static struct inode_operations ports_inode_ops = {
@@ -272,15 +281,10 @@
 	/*
 	 *  Get the node pointer, and fail if it doesn't exist.
 	 */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
-	de = PDE(inode);
-	if (!de) {
-		rtn = -ENXIO;
-		goto done;
-	}
-	nd = (struct nd_struct *)de->data;
-#else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
 	nd = (struct nd_struct *)PDE_DATA(inode);
+#else
+	nd = (struct nd_struct *)pde_data(inode);
 #endif
 	if (!nd) {
 		rtn = -ENXIO;
diff -Naur dgrp-1.9.40.orig/driver/2.6.27/dgrp_specproc.c dgrp-1.9.40.patched/driver/2.6.27/dgrp_specproc.c
--- dgrp-1.9.40.orig/driver/2.6.27/dgrp_specproc.c	2023-03-08 10:26:27.595444709 +0000
+++ dgrp-1.9.40.patched/driver/2.6.27/dgrp_specproc.c	2023-03-08 08:28:26.383313258 +0000
@@ -72,6 +72,7 @@
 #endif
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
 struct file_operations dgrp_proc_file_ops = {
 	.owner   = THIS_MODULE,		/* owner	*/
 	.read    = dgrp_gen_proc_read,	/* read		*/
@@ -79,6 +80,14 @@
 	.open    = dgrp_gen_proc_open,	/* open		*/
 	.release = dgrp_gen_proc_close,	/* release	*/
 };
+#else
+struct proc_ops dgrp_proc_file_ops = {
+	.proc_read    = dgrp_gen_proc_read,	/* read		*/
+	.proc_write   = dgrp_gen_proc_write,	/* write	*/
+	.proc_open    = dgrp_gen_proc_open,	/* open		*/
+	.proc_release = dgrp_gen_proc_close,	/* release	*/
+};
+#endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
 static struct inode_operations proc_inode_ops = {
@@ -449,21 +458,10 @@
 	struct dgrp_proc_entry *entry;
 	int ret = 0;
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
-	struct proc_dir_entry *de;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
-	de = (struct proc_dir_entry *) PDE(file->f_dentry->d_inode);
-#else
-	de = (struct proc_dir_entry *) PDE(file_inode(file));
-#endif
-	if (!de || !de->data) {
-		ret = -ENXIO;
-		goto done;
-	}
-
-	entry = (struct dgrp_proc_entry *) de->data;
-#else /* >=3,10,0 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
 	entry = (struct dgrp_proc_entry *) PDE_DATA(file_inode(file));
+#else
+	entry = (struct dgrp_proc_entry *) pde_data(file_inode(file));
 #endif
 	if (!entry) {
 		ret = -ENXIO;
@@ -495,20 +493,10 @@
 {
 	struct dgrp_proc_entry *entry;
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
-	struct proc_dir_entry *de;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
-	de = (struct proc_dir_entry *) PDE(file->f_dentry->d_inode);
-#else
-	de = (struct proc_dir_entry *) PDE(file_inode(file));
-#endif
-	if (!de || !de->data) {
-		goto done;
-	}
-
-	entry = (struct dgrp_proc_entry *) de->data;
-#else /* >=3,10,0 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
 	entry = (struct dgrp_proc_entry *) PDE_DATA(file_inode(file));
+#else
+	entry = (struct dgrp_proc_entry *) pde_data(file_inode(file));
 #endif
 	if (!entry)
 		goto done;
@@ -533,18 +521,9 @@
 	ssize_t error;
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
-	struct proc_dir_entry *de;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
-	de = (struct proc_dir_entry *) PDE(file->f_dentry->d_inode);
-#else
-	de = (struct proc_dir_entry *) PDE(file_inode(file));
-#endif
-	if (!de || !de->data)
-		return -ENXIO;
-
-	entry = (struct dgrp_proc_entry *) de->data;
-#else /* >=3,10,0 */
 	entry = (struct dgrp_proc_entry *) PDE_DATA(file_inode(file));
+#else
+	entry = (struct dgrp_proc_entry *) pde_data(file_inode(file));
 #endif
 	if (!entry)
 		return -ENXIO;
@@ -573,19 +552,10 @@
 	ssize_t res;
 	ssize_t error;
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
-	struct proc_dir_entry *de;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
-	de = (struct proc_dir_entry *) PDE(file->f_dentry->d_inode);
-#else
-	de = (struct proc_dir_entry *) PDE(file_inode(file));
-#endif
-	if (!de || !de->data)
-		return-ENXIO;
-
-	entry = (struct dgrp_proc_entry *) de->data;
-#else /* >=3,10,0 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
 	entry = (struct dgrp_proc_entry *) PDE_DATA(file_inode(file));
+#else
+	entry = (struct dgrp_proc_entry *) pde_data(file_inode(file));
 #endif
 	if (!entry)
 		return -ENXIO;
diff -Naur dgrp-1.9.40.orig/driver/2.6.27/dgrp_tty.c dgrp-1.9.40.patched/driver/2.6.27/dgrp_tty.c
--- dgrp-1.9.40.orig/driver/2.6.27/dgrp_tty.c	2023-03-08 10:23:58.263441937 +0000
+++ dgrp-1.9.40.patched/driver/2.6.27/dgrp_tty.c	2023-03-08 10:18:26.151435772 +0000
@@ -109,9 +109,9 @@
 static int dgrp_tty_open(struct tty_struct *, struct file *);
 static void dgrp_tty_close(struct tty_struct *, struct file *);
 static int dgrp_tty_write(struct tty_struct *, const unsigned char *, int);
-static int dgrp_tty_write_room(struct tty_struct *);
+static unsigned int dgrp_tty_write_room(struct tty_struct *);
 static void dgrp_tty_flush_buffer(struct tty_struct *);
-static int dgrp_tty_chars_in_buffer(struct tty_struct *);
+static unsigned int dgrp_tty_chars_in_buffer(struct tty_struct *);
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0)
 static int dgrp_tty_ioctl(struct tty_struct *, struct file *, unsigned int, unsigned long);
 #else
@@ -319,11 +319,13 @@
 
 	if ((ch->ch_digi.digi_flags & DIGI_COOK) != 0 &&
 	    (ch->ch_tun.un_open_count != 0)  &&
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
 	    !((un->un_tty)->ldisc->ops->flags & LDISC_FLAG_DEFINED) &&
 #else
 	    !((un->un_tty)->ldisc.ops->flags & LDISC_FLAG_DEFINED) &&
 #endif
+#endif
 	    !(L_XCASE(un->un_tty))) {
 		ch->ch_flag |= CH_FAST_WRITE;
 	} else {
@@ -735,7 +737,11 @@
 			 */
 
 			add_wait_queue(&nd->nd_seq_wque[in], &wait);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0))
 			current->state = TASK_INTERRUPTIBLE;
+#else
+			WRITE_ONCE(current->__state, TASK_INTERRUPTIBLE);
+#endif
 
 			DGRP_UNLOCK(nd->nd_lock, *lock_flags);
 
@@ -767,7 +773,11 @@
 
 			DGRP_LOCK(nd->nd_lock, *lock_flags);
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0))
 			current->state = TASK_RUNNING;
+#else
+			WRITE_ONCE(current->__state, TASK_RUNNING);
+#endif
 
 			if (signal_pending(current))
 				return -EINTR;
@@ -818,7 +828,11 @@
 	 */
 
 	add_wait_queue(&ch->ch_sleep, &wait);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0))
 	current->state = TASK_UNINTERRUPTIBLE;
+#else
+	WRITE_ONCE(current->__state, TASK_UNINTERRUPTIBLE);
+#endif
 
 	/*
 	 * Since we are uninterruptible, set a timer to
@@ -1212,8 +1226,11 @@
 		 */
 
 		add_wait_queue(&ch->ch_flag_wait, &wait);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0))
 		current->state = TASK_INTERRUPTIBLE;
-
+#else
+		WRITE_ONCE(current->__state, TASK_INTERRUPTIBLE);
+#endif
 		DGRP_UNLOCK(nd->nd_lock, lock_flags);
 
 		/*
@@ -1249,7 +1266,11 @@
 
 		DGRP_LOCK(nd->nd_lock, lock_flags);
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0))
 		current->state = TASK_RUNNING;
+#else
+		WRITE_ONCE(current->__state, TASK_RUNNING);
+#endif
 
 		ch->ch_wait_count[otype]--;
 
@@ -2486,7 +2507,7 @@
  *	Return space available in Tx buffer
  * 	count = ( ch->ch_tout - ch->ch_tin ) mod (TBUF_MAX - 1)
  */
-static int dgrp_tty_write_room(struct tty_struct *tty)
+static unsigned int dgrp_tty_write_room(struct tty_struct *tty)
 {
 	struct un_struct *un;
 	struct ch_struct *ch;
@@ -2536,7 +2557,7 @@
  * mask, not the TBUF_MASK.
  */
 
-static int dgrp_tty_chars_in_buffer(struct tty_struct *tty)
+static unsigned int dgrp_tty_chars_in_buffer(struct tty_struct *tty)
 {
 	struct un_struct *un;
 	struct ch_struct *ch;
@@ -3248,6 +3269,9 @@
 	return 0;
 }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,13,0)
+int tty_check_change(struct tty_struct *tty);
+#endif
 
 /*
  *	The usual assortment of ioctl's
@@ -4087,7 +4111,11 @@
 			kfree(nd->nd_serial_ttdriver->ttys);
 			nd->nd_serial_ttdriver->ttys = NULL;
 		}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
 		put_tty_driver(nd->nd_serial_ttdriver);
+#else
+		tty_driver_kref_put(nd->nd_serial_ttdriver);
+#endif
 		nd->nd_ttdriver_flags &= ~SERIAL_TTDRV_REG;
 	}
 
@@ -4103,7 +4131,11 @@
 			kfree(nd->nd_callout_ttdriver->ttys);
 			nd->nd_callout_ttdriver->ttys = NULL;
 		}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
 		put_tty_driver(nd->nd_callout_ttdriver);
+#else
+		tty_driver_kref_put(nd->nd_callout_ttdriver);
+#endif
 		nd->nd_ttdriver_flags &= ~CALLOUT_TTDRV_REG;
 	}
 
@@ -4119,7 +4151,11 @@
 			kfree(nd->nd_xprint_ttdriver->ttys);
 			nd->nd_xprint_ttdriver->ttys = NULL;
 		}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
 		put_tty_driver(nd->nd_xprint_ttdriver);
+#else
+		tty_driver_kref_put(nd->nd_xprint_ttdriver);
+#endif
 		nd->nd_ttdriver_flags &= ~XPRINT_TTDRV_REG;
 	}
 
@@ -4145,7 +4181,11 @@
 	 *  Initialize the TTDRIVER structures.
 	 */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
 	nd->nd_serial_ttdriver = alloc_tty_driver(CHAN_MAX);
+#else
+	nd->nd_serial_ttdriver = tty_alloc_driver(CHAN_MAX, 0);
+#endif
 	sprintf(nd->nd_serial_name,  "tty_dgrp_%s_", id);
 
 	nd->nd_serial_ttdriver->owner        = THIS_MODULE;
@@ -4209,7 +4249,11 @@
 		nd->nd_ttdriver_flags |= SERIAL_TTDRV_REG;
 	}
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
 	nd->nd_callout_ttdriver = alloc_tty_driver(CHAN_MAX);
+#else
+	nd->nd_callout_ttdriver = tty_alloc_driver(CHAN_MAX, 0);
+#endif
 	sprintf(nd->nd_callout_name, "cu_dgrp_%s_",  id);
 
 	nd->nd_callout_ttdriver->owner        = THIS_MODULE;
@@ -4250,7 +4294,11 @@
 	}
 
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
 	nd->nd_xprint_ttdriver = alloc_tty_driver(CHAN_MAX);
+#else
+	nd->nd_xprint_ttdriver = tty_alloc_driver(CHAN_MAX, 0);
+#endif
 	sprintf(nd->nd_xprint_name,  "pr_dgrp_%s_", id);
 
 	nd->nd_xprint_ttdriver->owner         = THIS_MODULE;
diff -Naur dgrp-1.9.40.orig/driver/2.6.27/include/dgrp_common.h dgrp-1.9.40.patched/driver/2.6.27/include/dgrp_common.h
--- dgrp-1.9.40.orig/driver/2.6.27/include/dgrp_common.h	2023-03-07 11:13:51.822615903 +0000
+++ dgrp-1.9.40.patched/driver/2.6.27/include/dgrp_common.h	2023-03-07 11:15:19.734617535 +0000
@@ -297,14 +297,16 @@
  *  "proc" table manipulation functions
  */
 #include <linux/proc_fs.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
 struct proc_dir_entry *dgrp_create_proc_entry(const char *name, mode_t mode,
-					      struct proc_dir_entry *parent);
-void dgrp_remove_proc_entry(struct proc_dir_entry *pde);
+						struct proc_dir_entry *parent,
+						struct file_operations *fops,
+						void *data);
+void dgrp_remove_proc_entry(struct nd_struct *nd, struct proc_dir_entry *parent);
 #else
 struct proc_dir_entry *dgrp_create_proc_entry(const char *name, mode_t mode,
 						struct proc_dir_entry *parent,
-						struct file_operations *fops,
+						struct proc_ops *fops,
 						void *data);
 void dgrp_remove_proc_entry(struct nd_struct *nd, struct proc_dir_entry *parent);
 #endif
diff -Naur dgrp-1.9.40.orig/driver/2.6.27/include/dgrp_proc.h dgrp-1.9.40.patched/driver/2.6.27/include/dgrp_proc.h
--- dgrp-1.9.40.orig/driver/2.6.27/include/dgrp_proc.h	2023-03-07 11:06:49.898608071 +0000
+++ dgrp-1.9.40.patched/driver/2.6.27/include/dgrp_proc.h	2023-03-07 10:59:53.738600346 +0000
@@ -50,4 +50,9 @@
 void dgrp_proc_unregister_all(void);
 void dgrp_proc_register_basic(void);
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
 extern struct file_operations dgrp_proc_file_ops;
+#else
+extern struct proc_ops dgrp_proc_file_ops;
+#endif
+
