mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-20 12:54:36 +08:00
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: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
16a1065f21
commit
cc93441eed
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user