amiserial: remove serial_* strings
authorJiri Slaby <jslaby@suse.cz>
Wed, 14 Jul 2021 09:13:05 +0000 (11:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jul 2021 10:49:50 +0000 (12:49 +0200)
Remove a print of serial_name and serial_version from the probe
function, i.e. show_serial_version() from amiga_serial_probe(). The
value of such a print is minimal.

Aside from that, the version is artificial (copied from the serial core
in 2.3.45pre2 and never increased). So inline the version into
seq_printf's format string in rs_proc_show() and remove both strings
completely.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210714091314.8292-2-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/amiserial.c

index 08987c438408ae064ff4baf1e9a1a8b1b016499b..b2ff5861ca786e505e6678c1db1022a11a71f36f 100644 (file)
@@ -40,8 +40,6 @@
 #include <linux/types.h>
 #include <linux/serial.h>
 #include <linux/serial_reg.h>
-static char *serial_version = "4.30";
-
 #include <linux/errno.h>
 #include <linux/signal.h>
 #include <linux/sched.h>
@@ -91,7 +89,6 @@ struct serial_state {
 };
 
 #define custom amiga_custom
-static char *serial_name = "Amiga-builtin serial driver";
 
 static struct tty_driver *serial_driver;
 
@@ -1452,7 +1449,7 @@ static inline void line_info(struct seq_file *m, int line,
 
 static int rs_proc_show(struct seq_file *m, void *v)
 {
-       seq_printf(m, "serinfo:1.0 driver:%s\n", serial_version);
+       seq_printf(m, "serinfo:1.0 driver:4.30\n");
        line_info(m, 0, &rs_table[0]);
        return 0;
 }
@@ -1465,17 +1462,6 @@ static int rs_proc_show(struct seq_file *m, void *v)
  * ---------------------------------------------------------------------
  */
 
-/*
- * This routine prints out the appropriate serial driver version
- * number, and identifies which options were configured into this
- * driver.
- */
-static void show_serial_version(void)
-{
-       printk(KERN_INFO "%s version %s\n", serial_name, serial_version);
-}
-
-
 static const struct tty_operations serial_ops = {
        .open = rs_open,
        .close = rs_close,
@@ -1542,8 +1528,6 @@ static int __init amiga_serial_probe(struct platform_device *pdev)
        if (!serial_driver)
                return -ENOMEM;
 
-       show_serial_version();
-
        /* Initialize the tty_driver structure */
 
        serial_driver->driver_name = "amiserial";
@@ -1628,7 +1612,6 @@ static int __exit amiga_serial_remove(struct platform_device *pdev)
 {
        struct serial_state *state = platform_get_drvdata(pdev);
 
-       /* printk("Unloading %s: version %s\n", serial_name, serial_version); */
        tty_unregister_driver(serial_driver);
        put_tty_driver(serial_driver);
        tty_port_destroy(&state->tport);