summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-11-08 19:01:15 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-14 04:59:48 +0100
commit656fb86770cffe25d002e1228931960219ccda6b (patch)
tree97cc7f9104cc776bb83cb819c4aaac02c65de08b /drivers/tty
parenttty: Convert SAK messages to tty_notice() (diff)
downloadlinux-656fb86770cffe25d002e1228931960219ccda6b.tar.xz
linux-656fb86770cffe25d002e1228931960219ccda6b.zip
tty: core: Add driver name to invalid device registration message
Include the driver name in the tty_register_device_attr() error message for invalid index. Note that tty_err() cannot be used here because there is no tty; use pr_err(). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/tty_io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index b64cd64a0563..86e379a38219 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -3249,8 +3249,8 @@ struct device *tty_register_device_attr(struct tty_driver *driver,
bool cdev = false;
if (index >= driver->num) {
- printk(KERN_ERR "Attempt to register invalid tty line number "
- " (%d).\n", index);
+ pr_err("%s: Attempt to register invalid tty line number (%d)\n",
+ driver->name, index);
return ERR_PTR(-EINVAL);
}