Allow the vizzini module to be installed side-by-side with cdc-acm.
* Use a dynamically allocated major device number.
* Use the tty name of /dev/ttyVIZx so it doesn't conflict with other devices.
* Create a udev rule which makes sure the device is bound to the vizzini
module. This is needed if the vizzini module is loaded *after* the cdc-acm
module as drivers are checked in the order they have been loaded and the
cdc-acm registers for the device class exported by the device.
This fixes the following build failure against 3.13:
xr21v141x-lnx-3.5-pak/vizzini.c: In function ‘xr21v141x_tty_set_termios’:
xr21v141x-lnx-3.5-pak/vizzini.c:1096:22:
error: invalid type argument of ‘->’ (have ‘struct ktermios’)
cflag = tty->termios->c_cflag;
In file included from xr21v141x-lnx-3.5-pak/vizzini.c:39:0:
include/linux/tty_flip.h:29:19: note: expected ‘struct tty_port *’ but argument
is of type ‘struct tty_struct *’
static inline int tty_insert_flip_string(struct tty_port *port,
^
xr21v141x-lnx-3.5-pak/vizzini.c:364:2: warning: passing argument 1 of
‘tty_flip_buffer_push’ from incompatible pointer type [enabled by default]
tty_flip_buffer_push(tty);
^
In file included from xr21v141x-lnx-3.5-pak/vizzini.c:39:0:
include/linux/tty_flip.h:14:13: note: expected ‘struct tty_port *’ but argument
is of type ‘struct tty_struct *’
extern void tty_flip_buffer_push(struct tty_port *port);
^
Joel Stanley [Mon, 2 Jun 2014 05:46:41 +0000 (15:16 +0930)]
Add readme and copy of GPLv2
Move the upstream readme aside, so we can show a sensible readme to a
user of the driver.
The readme explains where I got the code from, what I've done to it,
and how to use the module.
The existing files contain headers indicating they are GPLv2 or later.
In actual fact, they appear to be a copy of cdc-acm.c from the 3.6
kernel with the original copyrights and comments stripped.