diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-03-05 08:51:52 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-08 14:37:58 -0500 |
commit | 2f16669d322e05171c9e1cfd94f402f7399bd2a3 (patch) | |
tree | 6a036cd0352928dd7056976a5f457c229322d67f /drivers/misc/pti.c | |
parent | 87cab16beb882d3f9e61a2c0184fa7cf76de1f90 (diff) |
TTY: remove re-assignments to tty_driver members
All num, magic and owner are set by alloc_tty_driver. No need to
re-set them on each allocation site.
pti driver sets something different to what it passes to
alloc_tty_driver. It is not a bug, since we don't use the lines
parameter in any way. Anyway this is fixed, and now we do the right
thing.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/pti.c')
-rw-r--r-- | drivers/misc/pti.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/misc/pti.c b/drivers/misc/pti.c index 9a35db3d27fc..383133b201a1 100644 --- a/drivers/misc/pti.c +++ b/drivers/misc/pti.c | |||
@@ -907,20 +907,17 @@ static int __init pti_init(void) | |||
907 | 907 | ||
908 | /* First register module as tty device */ | 908 | /* First register module as tty device */ |
909 | 909 | ||
910 | pti_tty_driver = alloc_tty_driver(1); | 910 | pti_tty_driver = alloc_tty_driver(PTITTY_MINOR_NUM); |
911 | if (pti_tty_driver == NULL) { | 911 | if (pti_tty_driver == NULL) { |
912 | pr_err("%s(%d): Memory allocation failed for ptiTTY driver\n", | 912 | pr_err("%s(%d): Memory allocation failed for ptiTTY driver\n", |
913 | __func__, __LINE__); | 913 | __func__, __LINE__); |
914 | return -ENOMEM; | 914 | return -ENOMEM; |
915 | } | 915 | } |
916 | 916 | ||
917 | pti_tty_driver->owner = THIS_MODULE; | ||
918 | pti_tty_driver->magic = TTY_DRIVER_MAGIC; | ||
919 | pti_tty_driver->driver_name = DRIVERNAME; | 917 | pti_tty_driver->driver_name = DRIVERNAME; |
920 | pti_tty_driver->name = TTYNAME; | 918 | pti_tty_driver->name = TTYNAME; |
921 | pti_tty_driver->major = 0; | 919 | pti_tty_driver->major = 0; |
922 | pti_tty_driver->minor_start = PTITTY_MINOR_START; | 920 | pti_tty_driver->minor_start = PTITTY_MINOR_START; |
923 | pti_tty_driver->num = PTITTY_MINOR_NUM; | ||
924 | pti_tty_driver->type = TTY_DRIVER_TYPE_SYSTEM; | 921 | pti_tty_driver->type = TTY_DRIVER_TYPE_SYSTEM; |
925 | pti_tty_driver->subtype = SYSTEM_TYPE_SYSCONS; | 922 | pti_tty_driver->subtype = SYSTEM_TYPE_SYSCONS; |
926 | pti_tty_driver->flags = TTY_DRIVER_REAL_RAW | | 923 | pti_tty_driver->flags = TTY_DRIVER_REAL_RAW | |