mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
TTY: move cdev_add to tty_register_device
We need the /dev/ node not to be available before we call tty_register_device. Otherwise we might race with open and tty_struct->port might not be available at that time. This is not an issue now, but would be a problem after "TTY: use tty_port_register_device" is applied. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0019b4089c
commit
7e73eca6a7
2 changed files with 42 additions and 8 deletions
|
@ -289,7 +289,7 @@ struct tty_operations {
|
|||
struct tty_driver {
|
||||
int magic; /* magic number for this structure */
|
||||
struct kref kref; /* Reference management */
|
||||
struct cdev cdev;
|
||||
struct cdev *cdevs;
|
||||
struct module *owner;
|
||||
const char *driver_name;
|
||||
const char *name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue