Commit 63fe8567 authored by Vincent Mailhol's avatar Vincent Mailhol Committed by Marc Kleine-Budde

can: can327: use KBUILD_MODNAME instead of hard coded names

The driver uses the string "can327" to populate
tty_ldisc_ops::name. KBUILD_MODNAME also evaluates to "can327". Use
KBUILD_MODNAME and get rid on the hardcoded string names.
Signed-off-by: default avatarVincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/all/20220726082707.58758-2-mailhol.vincent@wanadoo.frSigned-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 1dba745c
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Fred N. van Kempen <waltje@uwalt.nl.mugnet.org> * Fred N. van Kempen <waltje@uwalt.nl.mugnet.org>
*/ */
#define pr_fmt(fmt) "can327: " fmt #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -1100,7 +1100,7 @@ static int can327_ldisc_ioctl(struct tty_struct *tty, unsigned int cmd, ...@@ -1100,7 +1100,7 @@ static int can327_ldisc_ioctl(struct tty_struct *tty, unsigned int cmd,
static struct tty_ldisc_ops can327_ldisc = { static struct tty_ldisc_ops can327_ldisc = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "can327", .name = KBUILD_MODNAME,
.num = N_CAN327, .num = N_CAN327,
.receive_buf = can327_ldisc_rx, .receive_buf = can327_ldisc_rx,
.write_wakeup = can327_ldisc_tx_wakeup, .write_wakeup = can327_ldisc_tx_wakeup,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment