Commit cc93441e authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman

TTY: synclink_cs, final cleanup in synclink_cs_init

* use <tab> for indentation
* add KERN_* to printks
* no more assignments in if's like if ((rc = function()))
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Acked-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 16a1065f
......@@ -2819,7 +2819,6 @@ static int __init synclink_cs_init(void)
}
/* Initialize the tty_driver structure */
serial_driver->driver_name = "synclink_cs";
serial_driver->name = "ttySLP";
serial_driver->major = ttymajor;
......@@ -2831,9 +2830,10 @@ static int __init synclink_cs_init(void)
B9600 | CS8 | CREAD | HUPCL | CLOCAL;
tty_set_operations(serial_driver, &mgslpc_ops);
if ((rc = tty_register_driver(serial_driver)) < 0) {
printk("%s(%d):Couldn't register serial driver\n",
__FILE__,__LINE__);
rc = tty_register_driver(serial_driver);
if (rc < 0) {
printk(KERN_ERR "%s(%d):Couldn't register serial driver\n",
__FILE__, __LINE__);
goto err_put_tty;
}
......@@ -2841,8 +2841,7 @@ static int __init synclink_cs_init(void)
if (rc < 0)
goto err_unreg_tty;
printk("%s %s, tty major#%d\n",
driver_name, driver_version,
printk(KERN_INFO "%s %s, tty major#%d\n", driver_name, driver_version,
serial_driver->major);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment