From b111b78c6ea52690a47f16922cb41c78f08dd298 Mon Sep 17 00:00:00 2001 From: Jeremiah Mahler Date: Fri, 21 Nov 2014 23:42:35 -0800 Subject: can: eliminate banner[] variable and switch to pr_info() Several CAN modules use a design pattern with a banner[] variable at the top which defines a string that is used once during init to print the banner. The 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. Signed-off-by: Jeremiah Mahler Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde --- net/can/af_can.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'net/can/af_can.c') diff --git a/net/can/af_can.c b/net/can/af_can.c index ce82337521f6..ac05be131df7 100644 --- a/net/can/af_can.c +++ b/net/can/af_can.c @@ -64,9 +64,6 @@ #include "af_can.h" -static __initconst const char banner[] = KERN_INFO - "can: controller area network core (" CAN_VERSION_STRING ")\n"; - MODULE_DESCRIPTION("Controller Area Network PF_CAN core"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_AUTHOR("Urs Thuermann , " @@ -896,7 +893,7 @@ static __init int can_init(void) offsetof(struct can_frame, data) != offsetof(struct canfd_frame, data)); - printk(banner); + pr_info("can: controller area network core (" CAN_VERSION_STRING ")\n"); memset(&can_rx_alldev_list, 0, sizeof(can_rx_alldev_list)); -- cgit