aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-08-07 15:47:54 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-13 19:50:20 -0400
commitcc93441eed0d39af9d99ba1642b9f733b195435c (patch)
tree00fd57f9811bcddc7c7389835686a8a81e603e45
parent16a1065f2113b2c068ea108a681fb6b1f3a02ce0 (diff)
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>
-rw-r--r--drivers/char/pcmcia/synclink_cs.c65
1 files changed, 32 insertions, 33 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index ce277f74bd10..923c3a47db0c 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -2803,47 +2803,46 @@ static const struct tty_operations mgslpc_ops = {
2803 2803
2804static int __init synclink_cs_init(void) 2804static int __init synclink_cs_init(void)
2805{ 2805{
2806 int rc; 2806 int rc;
2807 2807
2808 if (break_on_load) { 2808 if (break_on_load) {
2809 mgslpc_get_text_ptr(); 2809 mgslpc_get_text_ptr();
2810 BREAKPOINT(); 2810 BREAKPOINT();
2811 } 2811 }
2812 2812
2813 serial_driver = tty_alloc_driver(MAX_DEVICE_COUNT, 2813 serial_driver = tty_alloc_driver(MAX_DEVICE_COUNT,
2814 TTY_DRIVER_REAL_RAW | 2814 TTY_DRIVER_REAL_RAW |
2815 TTY_DRIVER_DYNAMIC_DEV); 2815 TTY_DRIVER_DYNAMIC_DEV);
2816 if (!serial_driver) { 2816 if (!serial_driver) {
2817 rc = -ENOMEM; 2817 rc = -ENOMEM;
2818 goto err; 2818 goto err;
2819 } 2819 }
2820 2820
2821 /* Initialize the tty_driver structure */ 2821 /* Initialize the tty_driver structure */
2822 2822 serial_driver->driver_name = "synclink_cs";
2823 serial_driver->driver_name = "synclink_cs"; 2823 serial_driver->name = "ttySLP";
2824 serial_driver->name = "ttySLP"; 2824 serial_driver->major = ttymajor;
2825 serial_driver->major = ttymajor; 2825 serial_driver->minor_start = 64;
2826 serial_driver->minor_start = 64; 2826 serial_driver->type = TTY_DRIVER_TYPE_SERIAL;
2827 serial_driver->type = TTY_DRIVER_TYPE_SERIAL; 2827 serial_driver->subtype = SERIAL_TYPE_NORMAL;
2828 serial_driver->subtype = SERIAL_TYPE_NORMAL; 2828 serial_driver->init_termios = tty_std_termios;
2829 serial_driver->init_termios = tty_std_termios; 2829 serial_driver->init_termios.c_cflag =
2830 serial_driver->init_termios.c_cflag = 2830 B9600 | CS8 | CREAD | HUPCL | CLOCAL;
2831 B9600 | CS8 | CREAD | HUPCL | CLOCAL; 2831 tty_set_operations(serial_driver, &mgslpc_ops);
2832 tty_set_operations(serial_driver, &mgslpc_ops); 2832
2833 2833 rc = tty_register_driver(serial_driver);
2834 if ((rc = tty_register_driver(serial_driver)) < 0) { 2834 if (rc < 0) {
2835 printk("%s(%d):Couldn't register serial driver\n", 2835 printk(KERN_ERR "%s(%d):Couldn't register serial driver\n",
2836 __FILE__,__LINE__); 2836 __FILE__, __LINE__);
2837 goto err_put_tty; 2837 goto err_put_tty;
2838 } 2838 }
2839 2839
2840 rc = pcmcia_register_driver(&mgslpc_driver); 2840 rc = pcmcia_register_driver(&mgslpc_driver);
2841 if (rc < 0) 2841 if (rc < 0)
2842 goto err_unreg_tty; 2842 goto err_unreg_tty;
2843 2843
2844 printk("%s %s, tty major#%d\n", 2844 printk(KERN_INFO "%s %s, tty major#%d\n", driver_name, driver_version,
2845 driver_name, driver_version, 2845 serial_driver->major);
2846 serial_driver->major);
2847 2846
2848 return 0; 2847 return 0;
2849err_unreg_tty: 2848err_unreg_tty: