@@ -35,6 +35,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -863,7 +865,7 @@ static struct slcan *slc_alloc(void)
if (!dev)
return NULL;
- snprintf(dev->name, sizeof(dev->name), "slcan%d", i);
+ snprintf(dev->name, sizeof(dev->name), KBUILD_MODNAME "%d", i);
dev->netdev_ops = &slc_netdev_ops;
dev->base_addr = i;
slcan_set_ethtool_ops(dev);
@@ -936,7 +938,7 @@ static int slcan_open(struct tty_struct *tty)
rtnl_unlock();
err = register_candev(sl->dev);
if (err) {
- pr_err("slcan: can't register candev\n");
+ pr_err("can't register candev\n");
goto err_free_chan;
}
} else {
@@ -1027,7 +1029,7 @@ static int slcan_ioctl(struct tty_struct *tty, unsigned int cmd,
static struct tty_ldisc_ops slc_ldisc = {
.owner = THIS_MODULE,
.num = N_SLCAN,
- .name = "slcan",
+ .name = KBUILD_MODNAME,
.open = slcan_open,
.close = slcan_close,
.hangup = slcan_hangup,
@@ -1043,8 +1045,8 @@ static int __init slcan_init(void)
if (maxdev < 4)
maxdev = 4; /* Sanity */
- pr_info("slcan: serial line CAN interface driver\n");
- pr_info("slcan: %d dynamic interface channels.\n", maxdev);
+ pr_info("serial line CAN interface driver\n");
+ pr_info("%d dynamic interface channels.\n", maxdev);
slcan_devs = kcalloc(maxdev, sizeof(struct net_device *), GFP_KERNEL);
if (!slcan_devs)
@@ -1053,7 +1055,7 @@ static int __init slcan_init(void)
/* Fill in our line protocol discipline, and register it */
status = tty_register_ldisc(&slc_ldisc);
if (status) {
- pr_err("slcan: can't register line discipline\n");
+ pr_err("can't register line discipline\n");
kfree(slcan_devs);
}
return status;