aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-03-05 08:51:52 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-08 14:37:58 -0500
commit2f16669d322e05171c9e1cfd94f402f7399bd2a3 (patch)
tree6a036cd0352928dd7056976a5f457c229322d67f
parent87cab16beb882d3f9e61a2c0184fa7cf76de1f90 (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>
-rw-r--r--arch/ia64/hp/sim/simserial.c1
-rw-r--r--arch/m68k/emu/nfcon.c1
-rw-r--r--arch/xtensa/platforms/iss/console.c1
-rw-r--r--drivers/char/pcmcia/synclink_cs.c1
-rw-r--r--drivers/char/ttyprintk.c2
-rw-r--r--drivers/isdn/capi/capi.c1
-rw-r--r--drivers/isdn/gigaset/interface.c7
-rw-r--r--drivers/misc/pti.c5
-rw-r--r--drivers/mmc/card/sdio_uart.c1
-rw-r--r--drivers/net/usb/hso.c2
-rw-r--r--drivers/s390/char/con3215.c1
-rw-r--r--drivers/s390/char/sclp_tty.c1
-rw-r--r--drivers/s390/char/sclp_vt220.c1
-rw-r--r--drivers/s390/char/tty3270.c1
-rw-r--r--drivers/tty/amiserial.c1
-rw-r--r--drivers/tty/bfin_jtag_comm.c1
-rw-r--r--drivers/tty/cyclades.c1
-rw-r--r--drivers/tty/ehv_bytechan.c1
-rw-r--r--drivers/tty/hvc/hvc_console.c1
-rw-r--r--drivers/tty/hvc/hvcs.c2
-rw-r--r--drivers/tty/hvc/hvsi.c1
-rw-r--r--drivers/tty/ipwireless/tty.c1
-rw-r--r--drivers/tty/isicom.c1
-rw-r--r--drivers/tty/moxa.c1
-rw-r--r--drivers/tty/mxser.c3
-rw-r--r--drivers/tty/n_gsm.c1
-rw-r--r--drivers/tty/nozomi.c1
-rw-r--r--drivers/tty/pty.c4
-rw-r--r--drivers/tty/rocket.c1
-rw-r--r--drivers/tty/serial/ifx6x60.c3
-rw-r--r--drivers/tty/serial/msm_smd_tty.c1
-rw-r--r--drivers/tty/serial/serial_core.c1
-rw-r--r--drivers/tty/synclink.c1
-rw-r--r--drivers/tty/synclink_gt.c1
-rw-r--r--drivers/tty/synclinkmp.c1
-rw-r--r--drivers/tty/vt/vt.c2
-rw-r--r--drivers/usb/class/cdc-acm.c1
-rw-r--r--drivers/usb/gadget/u_serial.c1
-rw-r--r--drivers/usb/serial/usb-serial.c1
-rw-r--r--net/bluetooth/rfcomm/tty.c1
-rw-r--r--net/irda/ircomm/ircomm_tty.c1
41 files changed, 3 insertions, 59 deletions
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index bff0824cf8a4..f513dc02bb87 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -928,7 +928,6 @@ simrs_init (void)
928 928
929 /* Initialize the tty_driver structure */ 929 /* Initialize the tty_driver structure */
930 930
931 hp_simserial_driver->owner = THIS_MODULE;
932 hp_simserial_driver->driver_name = "simserial"; 931 hp_simserial_driver->driver_name = "simserial";
933 hp_simserial_driver->name = "ttyS"; 932 hp_simserial_driver->name = "ttyS";
934 hp_simserial_driver->major = TTY_MAJOR; 933 hp_simserial_driver->major = TTY_MAJOR;
diff --git a/arch/m68k/emu/nfcon.c b/arch/m68k/emu/nfcon.c
index ab20dc0ff63b..8db25e806947 100644
--- a/arch/m68k/emu/nfcon.c
+++ b/arch/m68k/emu/nfcon.c
@@ -127,7 +127,6 @@ static int __init nfcon_init(void)
127 if (!nfcon_tty_driver) 127 if (!nfcon_tty_driver)
128 return -ENOMEM; 128 return -ENOMEM;
129 129
130 nfcon_tty_driver->owner = THIS_MODULE;
131 nfcon_tty_driver->driver_name = "nfcon"; 130 nfcon_tty_driver->driver_name = "nfcon";
132 nfcon_tty_driver->name = "nfcon"; 131 nfcon_tty_driver->name = "nfcon";
133 nfcon_tty_driver->type = TTY_DRIVER_TYPE_SYSTEM; 132 nfcon_tty_driver->type = TTY_DRIVER_TYPE_SYSTEM;
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c
index 2c723e8b30da..247e9d40a52e 100644
--- a/arch/xtensa/platforms/iss/console.c
+++ b/arch/xtensa/platforms/iss/console.c
@@ -216,7 +216,6 @@ int __init rs_init(void)
216 216
217 /* Initialize the tty_driver structure */ 217 /* Initialize the tty_driver structure */
218 218
219 serial_driver->owner = THIS_MODULE;
220 serial_driver->driver_name = "iss_serial"; 219 serial_driver->driver_name = "iss_serial";
221 serial_driver->name = "ttyS"; 220 serial_driver->name = "ttyS";
222 serial_driver->major = TTY_MAJOR; 221 serial_driver->major = TTY_MAJOR;
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index 07f6a5abe372..c3bcb1221e6b 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -2836,7 +2836,6 @@ static int __init synclink_cs_init(void)
2836 2836
2837 /* Initialize the tty_driver structure */ 2837 /* Initialize the tty_driver structure */
2838 2838
2839 serial_driver->owner = THIS_MODULE;
2840 serial_driver->driver_name = "synclink_cs"; 2839 serial_driver->driver_name = "synclink_cs";
2841 serial_driver->name = "ttySLP"; 2840 serial_driver->name = "ttySLP";
2842 serial_driver->major = ttymajor; 2841 serial_driver->major = ttymajor;
diff --git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c
index eedd5474850c..46b77ede84c0 100644
--- a/drivers/char/ttyprintk.c
+++ b/drivers/char/ttyprintk.c
@@ -184,12 +184,10 @@ static int __init ttyprintk_init(void)
184 if (!ttyprintk_driver) 184 if (!ttyprintk_driver)
185 return ret; 185 return ret;
186 186
187 ttyprintk_driver->owner = THIS_MODULE;
188 ttyprintk_driver->driver_name = "ttyprintk"; 187 ttyprintk_driver->driver_name = "ttyprintk";
189 ttyprintk_driver->name = "ttyprintk"; 188 ttyprintk_driver->name = "ttyprintk";
190 ttyprintk_driver->major = TTYAUX_MAJOR; 189 ttyprintk_driver->major = TTYAUX_MAJOR;
191 ttyprintk_driver->minor_start = 3; 190 ttyprintk_driver->minor_start = 3;
192 ttyprintk_driver->num = 1;
193 ttyprintk_driver->type = TTY_DRIVER_TYPE_CONSOLE; 191 ttyprintk_driver->type = TTY_DRIVER_TYPE_CONSOLE;
194 ttyprintk_driver->init_termios = tty_std_termios; 192 ttyprintk_driver->init_termios = tty_std_termios;
195 ttyprintk_driver->init_termios.c_oflag = OPOST | OCRNL | ONOCR | ONLRET; 193 ttyprintk_driver->init_termios.c_oflag = OPOST | OCRNL | ONOCR | ONLRET;
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 94948be5d366..baf08eba495c 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -1287,7 +1287,6 @@ static int __init capinc_tty_init(void)
1287 kfree(capiminors); 1287 kfree(capiminors);
1288 return -ENOMEM; 1288 return -ENOMEM;
1289 } 1289 }
1290 drv->owner = THIS_MODULE;
1291 drv->driver_name = "capi_nc"; 1290 drv->driver_name = "capi_nc";
1292 drv->name = "capi"; 1291 drv->name = "capi";
1293 drv->major = 0; 1292 drv->major = 0;
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c
index ee0a549a933a..648260b07f1a 100644
--- a/drivers/isdn/gigaset/interface.c
+++ b/drivers/isdn/gigaset/interface.c
@@ -669,17 +669,15 @@ EXPORT_SYMBOL_GPL(gigaset_if_receive);
669void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname, 669void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname,
670 const char *devname) 670 const char *devname)
671{ 671{
672 unsigned minors = drv->minors;
673 int ret; 672 int ret;
674 struct tty_driver *tty; 673 struct tty_driver *tty;
675 674
676 drv->have_tty = 0; 675 drv->have_tty = 0;
677 676
678 drv->tty = tty = alloc_tty_driver(minors); 677 drv->tty = tty = alloc_tty_driver(drv->minors);
679 if (tty == NULL) 678 if (tty == NULL)
680 goto enomem; 679 goto enomem;
681 680
682 tty->magic = TTY_DRIVER_MAGIC,
683 tty->type = TTY_DRIVER_TYPE_SERIAL, 681 tty->type = TTY_DRIVER_TYPE_SERIAL,
684 tty->subtype = SERIAL_TYPE_NORMAL, 682 tty->subtype = SERIAL_TYPE_NORMAL,
685 tty->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; 683 tty->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
@@ -687,9 +685,6 @@ void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname,
687 tty->driver_name = procname; 685 tty->driver_name = procname;
688 tty->name = devname; 686 tty->name = devname;
689 tty->minor_start = drv->minor; 687 tty->minor_start = drv->minor;
690 tty->num = drv->minors;
691
692 tty->owner = THIS_MODULE;
693 688
694 tty->init_termios = tty_std_termios; 689 tty->init_termios = tty_std_termios;
695 tty->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; 690 tty->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
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 |
diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c
index bd4a67cdac3f..5a2cbfac66d2 100644
--- a/drivers/mmc/card/sdio_uart.c
+++ b/drivers/mmc/card/sdio_uart.c
@@ -1175,7 +1175,6 @@ static int __init sdio_uart_init(void)
1175 if (!tty_drv) 1175 if (!tty_drv)
1176 return -ENOMEM; 1176 return -ENOMEM;
1177 1177
1178 tty_drv->owner = THIS_MODULE;
1179 tty_drv->driver_name = "sdio_uart"; 1178 tty_drv->driver_name = "sdio_uart";
1180 tty_drv->name = "ttySDIO"; 1179 tty_drv->name = "ttySDIO";
1181 tty_drv->major = 0; /* dynamically allocated */ 1180 tty_drv->major = 0; /* dynamically allocated */
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 304fe78ff60e..a73090f4c688 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -3313,7 +3313,6 @@ static int __init hso_init(void)
3313 3313
3314 /* fill in all needed values */ 3314 /* fill in all needed values */
3315 tty_drv->magic = TTY_DRIVER_MAGIC; 3315 tty_drv->magic = TTY_DRIVER_MAGIC;
3316 tty_drv->owner = THIS_MODULE;
3317 tty_drv->driver_name = driver_name; 3316 tty_drv->driver_name = driver_name;
3318 tty_drv->name = tty_filename; 3317 tty_drv->name = tty_filename;
3319 3318
@@ -3322,7 +3321,6 @@ static int __init hso_init(void)
3322 tty_drv->major = tty_major; 3321 tty_drv->major = tty_major;
3323 3322
3324 tty_drv->minor_start = 0; 3323 tty_drv->minor_start = 0;
3325 tty_drv->num = HSO_SERIAL_TTY_MINORS;
3326 tty_drv->type = TTY_DRIVER_TYPE_SERIAL; 3324 tty_drv->type = TTY_DRIVER_TYPE_SERIAL;
3327 tty_drv->subtype = SERIAL_TYPE_NORMAL; 3325 tty_drv->subtype = SERIAL_TYPE_NORMAL;
3328 tty_drv->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; 3326 tty_drv->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
index 934458ad55e5..fe916bfd60f2 100644
--- a/drivers/s390/char/con3215.c
+++ b/drivers/s390/char/con3215.c
@@ -1137,7 +1137,6 @@ static int __init tty3215_init(void)
1137 * proc_entry, set_termios, flush_buffer, set_ldisc, write_proc 1137 * proc_entry, set_termios, flush_buffer, set_ldisc, write_proc
1138 */ 1138 */
1139 1139
1140 driver->owner = THIS_MODULE;
1141 driver->driver_name = "tty3215"; 1140 driver->driver_name = "tty3215";
1142 driver->name = "ttyS"; 1141 driver->name = "ttyS";
1143 driver->major = TTY_MAJOR; 1142 driver->major = TTY_MAJOR;
diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c
index a879c139926a..40a9d69c898e 100644
--- a/drivers/s390/char/sclp_tty.c
+++ b/drivers/s390/char/sclp_tty.c
@@ -551,7 +551,6 @@ sclp_tty_init(void)
551 return rc; 551 return rc;
552 } 552 }
553 553
554 driver->owner = THIS_MODULE;
555 driver->driver_name = "sclp_line"; 554 driver->driver_name = "sclp_line";
556 driver->name = "sclp_line"; 555 driver->name = "sclp_line";
557 driver->major = TTY_MAJOR; 556 driver->major = TTY_MAJOR;
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c
index 5d706e6c946f..b635472ae660 100644
--- a/drivers/s390/char/sclp_vt220.c
+++ b/drivers/s390/char/sclp_vt220.c
@@ -685,7 +685,6 @@ static int __init sclp_vt220_tty_init(void)
685 if (rc) 685 if (rc)
686 goto out_driver; 686 goto out_driver;
687 687
688 driver->owner = THIS_MODULE;
689 driver->driver_name = SCLP_VT220_DRIVER_NAME; 688 driver->driver_name = SCLP_VT220_DRIVER_NAME;
690 driver->name = SCLP_VT220_DEVICE_NAME; 689 driver->name = SCLP_VT220_DEVICE_NAME;
691 driver->major = SCLP_VT220_MAJOR; 690 driver->major = SCLP_VT220_MAJOR;
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c
index 2db1482b406e..b43445a55cb6 100644
--- a/drivers/s390/char/tty3270.c
+++ b/drivers/s390/char/tty3270.c
@@ -1784,7 +1784,6 @@ static int __init tty3270_init(void)
1784 * Entries in tty3270_driver that are NOT initialized: 1784 * Entries in tty3270_driver that are NOT initialized:
1785 * proc_entry, set_termios, flush_buffer, set_ldisc, write_proc 1785 * proc_entry, set_termios, flush_buffer, set_ldisc, write_proc
1786 */ 1786 */
1787 driver->owner = THIS_MODULE;
1788 driver->driver_name = "ttyTUB"; 1787 driver->driver_name = "ttyTUB";
1789 driver->name = "ttyTUB"; 1788 driver->name = "ttyTUB";
1790 driver->major = IBM_TTY3270_MAJOR; 1789 driver->major = IBM_TTY3270_MAJOR;
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index b84c83456dcc..b42f00d987ae 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -1974,7 +1974,6 @@ static int __init amiga_serial_probe(struct platform_device *pdev)
1974 1974
1975 /* Initialize the tty_driver structure */ 1975 /* Initialize the tty_driver structure */
1976 1976
1977 serial_driver->owner = THIS_MODULE;
1978 serial_driver->driver_name = "amiserial"; 1977 serial_driver->driver_name = "amiserial";
1979 serial_driver->name = "ttyS"; 1978 serial_driver->name = "ttyS";
1980 serial_driver->major = TTY_MAJOR; 1979 serial_driver->major = TTY_MAJOR;
diff --git a/drivers/tty/bfin_jtag_comm.c b/drivers/tty/bfin_jtag_comm.c
index 3a997760ec32..946f799861f5 100644
--- a/drivers/tty/bfin_jtag_comm.c
+++ b/drivers/tty/bfin_jtag_comm.c
@@ -257,7 +257,6 @@ static int __init bfin_jc_init(void)
257 if (!bfin_jc_driver) 257 if (!bfin_jc_driver)
258 goto err_driver; 258 goto err_driver;
259 259
260 bfin_jc_driver->owner = THIS_MODULE;
261 bfin_jc_driver->driver_name = DRV_NAME; 260 bfin_jc_driver->driver_name = DRV_NAME;
262 bfin_jc_driver->name = DEV_NAME; 261 bfin_jc_driver->name = DEV_NAME;
263 bfin_jc_driver->type = TTY_DRIVER_TYPE_SERIAL; 262 bfin_jc_driver->type = TTY_DRIVER_TYPE_SERIAL;
diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
index 5575fee7a55e..bc7b5a5650ba 100644
--- a/drivers/tty/cyclades.c
+++ b/drivers/tty/cyclades.c
@@ -4090,7 +4090,6 @@ static int __init cy_init(void)
4090 4090
4091 /* Initialize the tty_driver structure */ 4091 /* Initialize the tty_driver structure */
4092 4092
4093 cy_serial_driver->owner = THIS_MODULE;
4094 cy_serial_driver->driver_name = "cyclades"; 4093 cy_serial_driver->driver_name = "cyclades";
4095 cy_serial_driver->name = "ttyC"; 4094 cy_serial_driver->name = "ttyC";
4096 cy_serial_driver->major = CYCLADES_MAJOR; 4095 cy_serial_driver->major = CYCLADES_MAJOR;
diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index 1595dba0072c..4813684cb634 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
@@ -825,7 +825,6 @@ static int __init ehv_bc_init(void)
825 goto error; 825 goto error;
826 } 826 }
827 827
828 ehv_bc_driver->owner = THIS_MODULE;
829 ehv_bc_driver->driver_name = "ehv-bc"; 828 ehv_bc_driver->driver_name = "ehv-bc";
830 ehv_bc_driver->name = ehv_bc_console.name; 829 ehv_bc_driver->name = ehv_bc_console.name;
831 ehv_bc_driver->type = TTY_DRIVER_TYPE_CONSOLE; 830 ehv_bc_driver->type = TTY_DRIVER_TYPE_CONSOLE;
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index b6b2d18fa38d..8880adf5fc6f 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -917,7 +917,6 @@ static int hvc_init(void)
917 goto out; 917 goto out;
918 } 918 }
919 919
920 drv->owner = THIS_MODULE;
921 drv->driver_name = "hvc"; 920 drv->driver_name = "hvc";
922 drv->name = "hvc"; 921 drv->name = "hvc";
923 drv->major = HVC_MAJOR; 922 drv->major = HVC_MAJOR;
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index df7e7a0a5e6c..da0aa476804d 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -1499,8 +1499,6 @@ static int __devinit hvcs_initialize(void)
1499 goto index_fail; 1499 goto index_fail;
1500 } 1500 }
1501 1501
1502 hvcs_tty_driver->owner = THIS_MODULE;
1503
1504 hvcs_tty_driver->driver_name = hvcs_driver_name; 1502 hvcs_tty_driver->driver_name = hvcs_driver_name;
1505 hvcs_tty_driver->name = hvcs_device_node; 1503 hvcs_tty_driver->name = hvcs_device_node;
1506 1504
diff --git a/drivers/tty/hvc/hvsi.c b/drivers/tty/hvc/hvsi.c
index 1b5f28bd7930..60bc45164189 100644
--- a/drivers/tty/hvc/hvsi.c
+++ b/drivers/tty/hvc/hvsi.c
@@ -1088,7 +1088,6 @@ static int __init hvsi_init(void)
1088 if (!hvsi_driver) 1088 if (!hvsi_driver)
1089 return -ENOMEM; 1089 return -ENOMEM;
1090 1090
1091 hvsi_driver->owner = THIS_MODULE;
1092 hvsi_driver->driver_name = "hvsi"; 1091 hvsi_driver->driver_name = "hvsi";
1093 hvsi_driver->name = "hvsi"; 1092 hvsi_driver->name = "hvsi";
1094 hvsi_driver->major = HVSI_MAJOR; 1093 hvsi_driver->major = HVSI_MAJOR;
diff --git a/drivers/tty/ipwireless/tty.c b/drivers/tty/ipwireless/tty.c
index ef92869502a7..6990b3b649d3 100644
--- a/drivers/tty/ipwireless/tty.c
+++ b/drivers/tty/ipwireless/tty.c
@@ -614,7 +614,6 @@ int ipwireless_tty_init(void)
614 if (!ipw_tty_driver) 614 if (!ipw_tty_driver)
615 return -ENOMEM; 615 return -ENOMEM;
616 616
617 ipw_tty_driver->owner = THIS_MODULE;
618 ipw_tty_driver->driver_name = IPWIRELESS_PCCARD_NAME; 617 ipw_tty_driver->driver_name = IPWIRELESS_PCCARD_NAME;
619 ipw_tty_driver->name = "ttyIPWp"; 618 ipw_tty_driver->name = "ttyIPWp";
620 ipw_tty_driver->major = 0; 619 ipw_tty_driver->major = 0;
diff --git a/drivers/tty/isicom.c b/drivers/tty/isicom.c
index e5c295ab5dec..b3a28b5f02ad 100644
--- a/drivers/tty/isicom.c
+++ b/drivers/tty/isicom.c
@@ -1678,7 +1678,6 @@ static int __init isicom_init(void)
1678 goto error; 1678 goto error;
1679 } 1679 }
1680 1680
1681 isicom_normal->owner = THIS_MODULE;
1682 isicom_normal->name = "ttyM"; 1681 isicom_normal->name = "ttyM";
1683 isicom_normal->major = ISICOM_NMAJOR; 1682 isicom_normal->major = ISICOM_NMAJOR;
1684 isicom_normal->minor_start = 0; 1683 isicom_normal->minor_start = 0;
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
index d15a071b1a54..4a26323a926f 100644
--- a/drivers/tty/moxa.c
+++ b/drivers/tty/moxa.c
@@ -1036,7 +1036,6 @@ static int __init moxa_init(void)
1036 if (!moxaDriver) 1036 if (!moxaDriver)
1037 return -ENOMEM; 1037 return -ENOMEM;
1038 1038
1039 moxaDriver->owner = THIS_MODULE;
1040 moxaDriver->name = "ttyMX"; 1039 moxaDriver->name = "ttyMX";
1041 moxaDriver->major = ttymajor; 1040 moxaDriver->major = ttymajor;
1042 moxaDriver->minor_start = 0; 1041 moxaDriver->minor_start = 0;
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 8998d527232a..260d03123524 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -2658,12 +2658,9 @@ static int __init mxser_module_init(void)
2658 MXSER_VERSION); 2658 MXSER_VERSION);
2659 2659
2660 /* Initialize the tty_driver structure */ 2660 /* Initialize the tty_driver structure */
2661 mxvar_sdriver->owner = THIS_MODULE;
2662 mxvar_sdriver->magic = TTY_DRIVER_MAGIC;
2663 mxvar_sdriver->name = "ttyMI"; 2661 mxvar_sdriver->name = "ttyMI";
2664 mxvar_sdriver->major = ttymajor; 2662 mxvar_sdriver->major = ttymajor;
2665 mxvar_sdriver->minor_start = 0; 2663 mxvar_sdriver->minor_start = 0;
2666 mxvar_sdriver->num = MXSER_PORTS + 1;
2667 mxvar_sdriver->type = TTY_DRIVER_TYPE_SERIAL; 2664 mxvar_sdriver->type = TTY_DRIVER_TYPE_SERIAL;
2668 mxvar_sdriver->subtype = SERIAL_TYPE_NORMAL; 2665 mxvar_sdriver->subtype = SERIAL_TYPE_NORMAL;
2669 mxvar_sdriver->init_termios = tty_std_termios; 2666 mxvar_sdriver->init_termios = tty_std_termios;
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index fc7bbba585ce..c43b683b6eb8 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -3120,7 +3120,6 @@ static int __init gsm_init(void)
3120 pr_err("gsm_init: tty allocation failed.\n"); 3120 pr_err("gsm_init: tty allocation failed.\n");
3121 return -EINVAL; 3121 return -EINVAL;
3122 } 3122 }
3123 gsm_tty_driver->owner = THIS_MODULE;
3124 gsm_tty_driver->driver_name = "gsmtty"; 3123 gsm_tty_driver->driver_name = "gsmtty";
3125 gsm_tty_driver->name = "gsmtty"; 3124 gsm_tty_driver->name = "gsmtty";
3126 gsm_tty_driver->major = 0; /* Dynamic */ 3125 gsm_tty_driver->major = 0; /* Dynamic */
diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c
index 580da78b2d86..e7592f9037da 100644
--- a/drivers/tty/nozomi.c
+++ b/drivers/tty/nozomi.c
@@ -1916,7 +1916,6 @@ static __init int nozomi_init(void)
1916 if (!ntty_driver) 1916 if (!ntty_driver)
1917 return -ENOMEM; 1917 return -ENOMEM;
1918 1918
1919 ntty_driver->owner = THIS_MODULE;
1920 ntty_driver->driver_name = NOZOMI_NAME_TTY; 1919 ntty_driver->driver_name = NOZOMI_NAME_TTY;
1921 ntty_driver->name = "noz"; 1920 ntty_driver->name = "noz";
1922 ntty_driver->major = 0; 1921 ntty_driver->major = 0;
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index d505837b3478..f96ecaec24f8 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -393,7 +393,6 @@ static void __init legacy_pty_init(void)
393 if (!pty_slave_driver) 393 if (!pty_slave_driver)
394 panic("Couldn't allocate pty slave driver"); 394 panic("Couldn't allocate pty slave driver");
395 395
396 pty_driver->owner = THIS_MODULE;
397 pty_driver->driver_name = "pty_master"; 396 pty_driver->driver_name = "pty_master";
398 pty_driver->name = "pty"; 397 pty_driver->name = "pty";
399 pty_driver->major = PTY_MASTER_MAJOR; 398 pty_driver->major = PTY_MASTER_MAJOR;
@@ -411,7 +410,6 @@ static void __init legacy_pty_init(void)
411 pty_driver->other = pty_slave_driver; 410 pty_driver->other = pty_slave_driver;
412 tty_set_operations(pty_driver, &master_pty_ops_bsd); 411 tty_set_operations(pty_driver, &master_pty_ops_bsd);
413 412
414 pty_slave_driver->owner = THIS_MODULE;
415 pty_slave_driver->driver_name = "pty_slave"; 413 pty_slave_driver->driver_name = "pty_slave";
416 pty_slave_driver->name = "ttyp"; 414 pty_slave_driver->name = "ttyp";
417 pty_slave_driver->major = PTY_SLAVE_MAJOR; 415 pty_slave_driver->major = PTY_SLAVE_MAJOR;
@@ -671,7 +669,6 @@ static void __init unix98_pty_init(void)
671 if (!pts_driver) 669 if (!pts_driver)
672 panic("Couldn't allocate Unix98 pts driver"); 670 panic("Couldn't allocate Unix98 pts driver");
673 671
674 ptm_driver->owner = THIS_MODULE;
675 ptm_driver->driver_name = "pty_master"; 672 ptm_driver->driver_name = "pty_master";
676 ptm_driver->name = "ptm"; 673 ptm_driver->name = "ptm";
677 ptm_driver->major = UNIX98_PTY_MASTER_MAJOR; 674 ptm_driver->major = UNIX98_PTY_MASTER_MAJOR;
@@ -690,7 +687,6 @@ static void __init unix98_pty_init(void)
690 ptm_driver->other = pts_driver; 687 ptm_driver->other = pts_driver;
691 tty_set_operations(ptm_driver, &ptm_unix98_ops); 688 tty_set_operations(ptm_driver, &ptm_unix98_ops);
692 689
693 pts_driver->owner = THIS_MODULE;
694 pts_driver->driver_name = "pty_slave"; 690 pts_driver->driver_name = "pty_slave";
695 pts_driver->name = "pts"; 691 pts_driver->name = "pts";
696 pts_driver->major = UNIX98_PTY_SLAVE_MAJOR; 692 pts_driver->major = UNIX98_PTY_SLAVE_MAJOR;
diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c
index de88aa5566e5..b088e1ea4331 100644
--- a/drivers/tty/rocket.c
+++ b/drivers/tty/rocket.c
@@ -2277,7 +2277,6 @@ static int __init rp_init(void)
2277 * driver with the tty layer. 2277 * driver with the tty layer.
2278 */ 2278 */
2279 2279
2280 rocket_driver->owner = THIS_MODULE;
2281 rocket_driver->flags = TTY_DRIVER_DYNAMIC_DEV; 2280 rocket_driver->flags = TTY_DRIVER_DYNAMIC_DEV;
2282 rocket_driver->name = "ttyR"; 2281 rocket_driver->name = "ttyR";
2283 rocket_driver->driver_name = "Comtrol RocketPort"; 2282 rocket_driver->driver_name = "Comtrol RocketPort";
diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
index 7e925e20cbaa..144cd3987d4c 100644
--- a/drivers/tty/serial/ifx6x60.c
+++ b/drivers/tty/serial/ifx6x60.c
@@ -1375,12 +1375,9 @@ static int __init ifx_spi_init(void)
1375 return -ENOMEM; 1375 return -ENOMEM;
1376 } 1376 }
1377 1377
1378 tty_drv->magic = TTY_DRIVER_MAGIC;
1379 tty_drv->owner = THIS_MODULE;
1380 tty_drv->driver_name = DRVNAME; 1378 tty_drv->driver_name = DRVNAME;
1381 tty_drv->name = TTYNAME; 1379 tty_drv->name = TTYNAME;
1382 tty_drv->minor_start = IFX_SPI_TTY_ID; 1380 tty_drv->minor_start = IFX_SPI_TTY_ID;
1383 tty_drv->num = 1;
1384 tty_drv->type = TTY_DRIVER_TYPE_SERIAL; 1381 tty_drv->type = TTY_DRIVER_TYPE_SERIAL;
1385 tty_drv->subtype = SERIAL_TYPE_NORMAL; 1382 tty_drv->subtype = SERIAL_TYPE_NORMAL;
1386 tty_drv->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; 1383 tty_drv->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
diff --git a/drivers/tty/serial/msm_smd_tty.c b/drivers/tty/serial/msm_smd_tty.c
index 4f41dcdcb771..b25e6ee71443 100644
--- a/drivers/tty/serial/msm_smd_tty.c
+++ b/drivers/tty/serial/msm_smd_tty.c
@@ -203,7 +203,6 @@ static int __init smd_tty_init(void)
203 if (smd_tty_driver == 0) 203 if (smd_tty_driver == 0)
204 return -ENOMEM; 204 return -ENOMEM;
205 205
206 smd_tty_driver->owner = THIS_MODULE;
207 smd_tty_driver->driver_name = "smd_tty_driver"; 206 smd_tty_driver->driver_name = "smd_tty_driver";
208 smd_tty_driver->name = "smd"; 207 smd_tty_driver->name = "smd";
209 smd_tty_driver->major = 0; 208 smd_tty_driver->major = 0;
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 13056180adf5..9c4c05b2825b 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -2230,7 +2230,6 @@ int uart_register_driver(struct uart_driver *drv)
2230 2230
2231 drv->tty_driver = normal; 2231 drv->tty_driver = normal;
2232 2232
2233 normal->owner = drv->owner;
2234 normal->driver_name = drv->driver_name; 2233 normal->driver_name = drv->driver_name;
2235 normal->name = drv->dev_name; 2234 normal->name = drv->dev_name;
2236 normal->major = drv->major; 2235 normal->major = drv->major;
diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c
index ff8017f87914..2b2988c779c7 100644
--- a/drivers/tty/synclink.c
+++ b/drivers/tty/synclink.c
@@ -4333,7 +4333,6 @@ static int mgsl_init_tty(void)
4333 if (!serial_driver) 4333 if (!serial_driver)
4334 return -ENOMEM; 4334 return -ENOMEM;
4335 4335
4336 serial_driver->owner = THIS_MODULE;
4337 serial_driver->driver_name = "synclink"; 4336 serial_driver->driver_name = "synclink";
4338 serial_driver->name = "ttySL"; 4337 serial_driver->name = "ttySL";
4339 serial_driver->major = ttymajor; 4338 serial_driver->major = ttymajor;
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c
index 18b48cd3b41d..a8b66be37e6e 100644
--- a/drivers/tty/synclink_gt.c
+++ b/drivers/tty/synclink_gt.c
@@ -3795,7 +3795,6 @@ static int __init slgt_init(void)
3795 3795
3796 /* Initialize the tty_driver structure */ 3796 /* Initialize the tty_driver structure */
3797 3797
3798 serial_driver->owner = THIS_MODULE;
3799 serial_driver->driver_name = tty_driver_name; 3798 serial_driver->driver_name = tty_driver_name;
3800 serial_driver->name = tty_dev_prefix; 3799 serial_driver->name = tty_dev_prefix;
3801 serial_driver->major = ttymajor; 3800 serial_driver->major = ttymajor;
diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c
index a7efe538df00..ddabb61c85ba 100644
--- a/drivers/tty/synclinkmp.c
+++ b/drivers/tty/synclinkmp.c
@@ -3977,7 +3977,6 @@ static int __init synclinkmp_init(void)
3977 3977
3978 /* Initialize the tty_driver structure */ 3978 /* Initialize the tty_driver structure */
3979 3979
3980 serial_driver->owner = THIS_MODULE;
3981 serial_driver->driver_name = "synclinkmp"; 3980 serial_driver->driver_name = "synclinkmp";
3982 serial_driver->name = "ttySLM"; 3981 serial_driver->name = "ttySLM";
3983 serial_driver->major = ttymajor; 3982 serial_driver->major = ttymajor;
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index e5abceacc2d0..84c4a7d5603e 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -2994,7 +2994,7 @@ int __init vty_init(const struct file_operations *console_fops)
2994 console_driver = alloc_tty_driver(MAX_NR_CONSOLES); 2994 console_driver = alloc_tty_driver(MAX_NR_CONSOLES);
2995 if (!console_driver) 2995 if (!console_driver)
2996 panic("Couldn't allocate console driver\n"); 2996 panic("Couldn't allocate console driver\n");
2997 console_driver->owner = THIS_MODULE; 2997
2998 console_driver->name = "tty"; 2998 console_driver->name = "tty";
2999 console_driver->name_base = 1; 2999 console_driver->name_base = 1;
3000 console_driver->major = TTY_MAJOR; 3000 console_driver->major = TTY_MAJOR;
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 11a1130319d1..6bb8472155c6 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1670,7 +1670,6 @@ static int __init acm_init(void)
1670 acm_tty_driver = alloc_tty_driver(ACM_TTY_MINORS); 1670 acm_tty_driver = alloc_tty_driver(ACM_TTY_MINORS);
1671 if (!acm_tty_driver) 1671 if (!acm_tty_driver)
1672 return -ENOMEM; 1672 return -ENOMEM;
1673 acm_tty_driver->owner = THIS_MODULE,
1674 acm_tty_driver->driver_name = "acm", 1673 acm_tty_driver->driver_name = "acm",
1675 acm_tty_driver->name = "ttyACM", 1674 acm_tty_driver->name = "ttyACM",
1676 acm_tty_driver->major = ACM_TTY_MAJOR, 1675 acm_tty_driver->major = ACM_TTY_MAJOR,
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index 6597a6813e43..490b01dd5d60 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -1087,7 +1087,6 @@ int __init gserial_setup(struct usb_gadget *g, unsigned count)
1087 if (!gs_tty_driver) 1087 if (!gs_tty_driver)
1088 return -ENOMEM; 1088 return -ENOMEM;
1089 1089
1090 gs_tty_driver->owner = THIS_MODULE;
1091 gs_tty_driver->driver_name = "g_serial"; 1090 gs_tty_driver->driver_name = "g_serial";
1092 gs_tty_driver->name = PREFIX; 1091 gs_tty_driver->name = PREFIX;
1093 /* uses dynamically assigned dev_t values */ 1092 /* uses dynamically assigned dev_t values */
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 1e30cc92719c..d4e724d9b1f4 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -1235,7 +1235,6 @@ static int __init usb_serial_init(void)
1235 goto exit_bus; 1235 goto exit_bus;
1236 } 1236 }
1237 1237
1238 usb_serial_tty_driver->owner = THIS_MODULE;
1239 usb_serial_tty_driver->driver_name = "usbserial"; 1238 usb_serial_tty_driver->driver_name = "usbserial";
1240 usb_serial_tty_driver->name = "ttyUSB"; 1239 usb_serial_tty_driver->name = "ttyUSB";
1241 usb_serial_tty_driver->major = SERIAL_TTY_MAJOR; 1240 usb_serial_tty_driver->major = SERIAL_TTY_MAJOR;
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index a2d4f5122a6a..7adb03ca51c2 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -1157,7 +1157,6 @@ int __init rfcomm_init_ttys(void)
1157 if (!rfcomm_tty_driver) 1157 if (!rfcomm_tty_driver)
1158 return -ENOMEM; 1158 return -ENOMEM;
1159 1159
1160 rfcomm_tty_driver->owner = THIS_MODULE;
1161 rfcomm_tty_driver->driver_name = "rfcomm"; 1160 rfcomm_tty_driver->driver_name = "rfcomm";
1162 rfcomm_tty_driver->name = "rfcomm"; 1161 rfcomm_tty_driver->name = "rfcomm";
1163 rfcomm_tty_driver->major = RFCOMM_TTY_MAJOR; 1162 rfcomm_tty_driver->major = RFCOMM_TTY_MAJOR;
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
index 253695d43fd9..828f88603d6c 100644
--- a/net/irda/ircomm/ircomm_tty.c
+++ b/net/irda/ircomm/ircomm_tty.c
@@ -122,7 +122,6 @@ static int __init ircomm_tty_init(void)
122 return -ENOMEM; 122 return -ENOMEM;
123 } 123 }
124 124
125 driver->owner = THIS_MODULE;
126 driver->driver_name = "ircomm"; 125 driver->driver_name = "ircomm";
127 driver->name = "ircomm"; 126 driver->name = "ircomm";
128 driver->major = IRCOMM_TTY_MAJOR; 127 driver->major = IRCOMM_TTY_MAJOR;