diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-08-08 16:26:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-13 19:45:39 -0400 |
commit | 7e73eca6a7b2967423902a4543821bb97cbbe698 (patch) | |
tree | 8c733036a77be59040ed7e346676445a83043b10 /include/linux/tty_driver.h | |
parent | 0019b4089ccef8148d8be83cc8adfc81a75b47d4 (diff) |
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>
Diffstat (limited to 'include/linux/tty_driver.h')
-rw-r--r-- | include/linux/tty_driver.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 44e05b75d573..dd976cfb6131 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -289,7 +289,7 @@ struct tty_operations { | |||
289 | struct tty_driver { | 289 | struct tty_driver { |
290 | int magic; /* magic number for this structure */ | 290 | int magic; /* magic number for this structure */ |
291 | struct kref kref; /* Reference management */ | 291 | struct kref kref; /* Reference management */ |
292 | struct cdev cdev; | 292 | struct cdev *cdevs; |
293 | struct module *owner; | 293 | struct module *owner; |
294 | const char *driver_name; | 294 | const char *driver_name; |
295 | const char *name; | 295 | const char *name; |