]> git.baikalelectronics.ru Git - kernel.git/commitdiff
can: ems_usb: use KBUILD_MODNAME instead of hard coded names
authorVincent Mailhol <mailhol.vincent@wanadoo.fr>
Tue, 26 Jul 2022 08:26:59 +0000 (17:26 +0900)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 26 Jul 2022 08:46:29 +0000 (10:46 +0200)
The driver uses the string "ems_usb" to populate usb_driver::name and
can_bittiming_const::name. KBUILD_MODNAME also evaluates to
"ems_ubs". Use KBUILD_MODNAME and get rid on the hardcoded string
names.

Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/all/20220726082707.58758-3-mailhol.vincent@wanadoo.fr
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/ems_usb.c

index bbec3311d89342fa3fa669e4d011080c7614d2c6..e86a2033db600cf1d62586801bce65310e86ae66 100644 (file)
@@ -880,7 +880,7 @@ static const struct net_device_ops ems_usb_netdev_ops = {
 };
 
 static const struct can_bittiming_const ems_usb_bittiming_const = {
-       .name = "ems_usb",
+       .name = KBUILD_MODNAME,
        .tseg1_min = 1,
        .tseg1_max = 16,
        .tseg2_min = 1,
@@ -1074,7 +1074,7 @@ static void ems_usb_disconnect(struct usb_interface *intf)
 
 /* usb specific object needed to register this driver with the usb subsystem */
 static struct usb_driver ems_usb_driver = {
-       .name = "ems_usb",
+       .name = KBUILD_MODNAME,
        .probe = ems_usb_probe,
        .disconnect = ems_usb_disconnect,
        .id_table = ems_usb_table,