diff options
author | Jeremiah Mahler <jmmahler@gmail.com> | 2014-12-03 00:44:04 -0800 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2014-12-07 21:22:05 +0100 |
commit | ace9bb228de3ef5752d6aa8e17c84a8488a26346 (patch) | |
tree | 44e8350ed74c47692b93021e10b340a1c2016cac /drivers/net/can/vcan.c | |
parent | b111b78c6ea52690a47f16922cb41c78f08dd298 (diff) | |
download | lwn-ace9bb228de3ef5752d6aa8e17c84a8488a26346.tar.gz lwn-ace9bb228de3ef5752d6aa8e17c84a8488a26346.zip |
can: slcan/vcan: eliminate banner[] variable, switch to pr_info()
Several can modules in drivers/net/can use a banner[] variable at the
top which defines a string that is used once during init. This string
is also embedded with KERN_INFO which makes it printk() specific.
Improve the code by eliminating the banner[] variable and moving the
string to where it is printed. Then switch from printk(KERN_INFO to
pr_info() for the lines that were changed.
This patch is similar to [1] which was applied to net/can.
[1]: https://lkml.org/lkml/2014/11/22/10
Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/vcan.c')
-rw-r--r-- | drivers/net/can/vcan.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c index 4e94057ef5cf..674f367087c5 100644 --- a/drivers/net/can/vcan.c +++ b/drivers/net/can/vcan.c @@ -50,9 +50,6 @@ #include <linux/slab.h> #include <net/rtnetlink.h> -static __initconst const char banner[] = - KERN_INFO "vcan: Virtual CAN interface driver\n"; - MODULE_DESCRIPTION("virtual CAN interface"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_AUTHOR("Urs Thuermann <urs.thuermann@volkswagen.de>"); @@ -173,7 +170,7 @@ static struct rtnl_link_ops vcan_link_ops __read_mostly = { static __init int vcan_init_module(void) { - printk(banner); + pr_info("vcan: Virtual CAN interface driver\n"); if (echo) printk(KERN_INFO "vcan: enabled echo on driver level.\n"); |