mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
UPSTREAM: 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>
Change-Id: I7d5b4b0f9a47a6c37d58c208782ca2f6d26650c8
(cherry picked from commit 73a3d4f418)
Signed-off-by: Jiahang Zheng <jiahang.zheng@rock-chips.com>
This commit is contained in:
committed by
Tao Huang
parent
5cd2ae076a
commit
43494d8e80
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user