can: vcan: introduce pr_fmt and make use of it

This patch introduces pr_fmt and makes use of it, also it converts a
printk() to pr_info().

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
Marc Kleine-Budde 2019-07-26 09:35:43 +02:00
parent 4248f5e02f
commit e83e416cdf

View File

@ -38,6 +38,8 @@
* *
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
@ -166,10 +168,10 @@ static struct rtnl_link_ops vcan_link_ops __read_mostly = {
static __init int vcan_init_module(void) static __init int vcan_init_module(void)
{ {
pr_info("vcan: Virtual CAN interface driver\n"); pr_info("Virtual CAN interface driver\n");
if (echo) if (echo)
printk(KERN_INFO "vcan: enabled echo on driver level.\n"); pr_info("enabled echo on driver level.\n");
return rtnl_link_register(&vcan_link_ops); return rtnl_link_register(&vcan_link_ops);
} }