aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/msm_smd_tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/msm_smd_tty.c')
-rw-r--r--drivers/tty/serial/msm_smd_tty.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/tty/serial/msm_smd_tty.c b/drivers/tty/serial/msm_smd_tty.c
index b25e6ee71443..925d1fa153db 100644
--- a/drivers/tty/serial/msm_smd_tty.c
+++ b/drivers/tty/serial/msm_smd_tty.c
@@ -223,9 +223,11 @@ static int __init smd_tty_init(void)
223 return ret; 223 return ret;
224 224
225 for (i = 0; i < smd_tty_channels_len; i++) { 225 for (i = 0; i < smd_tty_channels_len; i++) {
226 tty_port_init(&smd_tty[smd_tty_channels[i].id].port); 226 struct tty_port *port = &smd_tty[smd_tty_channels[i].id].port;
227 smd_tty[smd_tty_channels[i].id].port.ops = &smd_tty_port_ops; 227 tty_port_init(port);
228 tty_register_device(smd_tty_driver, smd_tty_channels[i].id, 0); 228 port->ops = &smd_tty_port_ops;
229 tty_port_register_device(port, smd_tty_driver,
230 smd_tty_channels[i].id, NULL);
229 } 231 }
230 232
231 return 0; 233 return 0;