summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-10-25 16:51:48 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-26 20:19:42 +0300
commit73a3d4f41886e6bd27f8b09c6235539a586e5131 (patch)
tree403c7ecc92602501f7b7f6bfb903956c31adb113 /drivers/tty
parent88af70be4a5b936aa440bb9e22e6c57304067db6 (diff)
downloadlinux-73a3d4f41886e6bd27f8b09c6235539a586e5131.tar.xz
tty: rpmsg: Define tty name via constant string literal
Driver uses already twice the same string literal. Define it in one place, so every user will have this name consistent. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20211025135148.53944-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/rpmsg_tty.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/rpmsg_tty.c b/drivers/tty/rpmsg_tty.c
index 4bee6c5bbb53..dae2a4e44f38 100644
--- a/drivers/tty/rpmsg_tty.c
+++ b/drivers/tty/rpmsg_tty.c
@@ -18,6 +18,7 @@
#include <linux/tty.h>
#include <linux/tty_flip.h>
+#define RPMSG_TTY_NAME "ttyRPMSG"
#define MAX_TTY_RPMSG 32
static DEFINE_IDR(tty_idr); /* tty instance id */
@@ -172,7 +173,7 @@ static int rpmsg_tty_probe(struct rpmsg_device *rpdev)
dev_set_drvdata(dev, cport);
- dev_dbg(dev, "New channel: 0x%x -> 0x%x : ttyRPMSG%d\n",
+ dev_dbg(dev, "New channel: 0x%x -> 0x%x: " RPMSG_TTY_NAME "%d\n",
rpdev->src, rpdev->dst, cport->id);
return 0;
@@ -224,7 +225,7 @@ static int __init rpmsg_tty_init(void)
return PTR_ERR(rpmsg_tty_driver);
rpmsg_tty_driver->driver_name = "rpmsg_tty";
- rpmsg_tty_driver->name = "ttyRPMSG";
+ rpmsg_tty_driver->name = RPMSG_TTY_NAME;
rpmsg_tty_driver->major = 0;
rpmsg_tty_driver->type = TTY_DRIVER_TYPE_CONSOLE;