/************
* Includes *
************/
+#include <linux/version.h>
#include "unipi_common.h"
#include "unipi_platform.h"
.val_bits = 16,
.max_register = 65535,
.cache_type = REGCACHE_RBTREE,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,6)
+ .use_single_read = 0,
+ .use_single_write = 0,
+#else
.use_single_rw = 0,
+#endif
.can_multi_write = 1,
};
#include <linux/module.h>
#include <linux/ratelimit.h>
#include <linux/vmalloc.h>
+#include <linux/version.h>
#include "unipi_tty.h"
}
#ifdef CONFIG_COMPAT
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0)
+
static long unipi_tty_compat_ioctl(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg)
{
}
}
#endif
+#endif
static struct tty_ldisc_ops unipi_tty_ops = {
.magic = TTY_LDISC_MAGIC,
.write = unipi_tty_write,
.ioctl = unipi_tty_ioctl,
#ifdef CONFIG_COMPAT
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0)
.compat_ioctl = unipi_tty_compat_ioctl,
+#endif
#endif
.set_termios = unipi_tty_set_termios,
.poll = unipi_tty_poll,