#if NEURONSPI_SCHED_REQUIRED > 0
#include <uapi/linux/sched/types.h>
#endif
-#define NEURONSPI_MAJOR_VERSIONSTRING "Version 1.19:2019:01:23"
+#define NEURONSPI_MAJOR_VERSIONSTRING "Version 1.20:2019:02:05"
#define NEURONSPI_MAX_DEVS 3
#define NEURONSPI_MAX_UART 16
unipi_tty_trace(KERN_INFO "UNIPI_LDISC: Close OK.");
}
+static int unipi_is_port_unipi(struct tty_struct *tty)
+{
+ struct uart_state *state = tty->driver_data;
+ struct uart_port *uport;
+
+ uport = state->uart_port;
+ return (uport->type == PORT_NEURONSPI);
+}
+
/**
* unipi_tty_open - open an ldisc
* @tty: terminal to open
{
struct unipi_tty_data *ldata;
+ if (!unipi_is_port_unipi(tty))
+ goto err;
+
/* Currently a malloc failure here can panic */
ldata = vmalloc(sizeof(*ldata));
if (!ldata)