The driver uses the string "kvaser_usb" to populate usb_driver::name. Add a new macro DRV_NAME which evaluates to "ems_ubs" and then use DRV_NAME and to get rid on the hardcoded string names. Signed-off-by: Vincent Mailhol <mailhol.vincent@xxxxxxxxxx> --- drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c index f211bfcb1d97..a6cff8da5a41 100644 --- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c +++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c @@ -29,6 +29,8 @@ #include "kvaser_usb.h" +#define DRV_NAME "kvaser_usb" + /* Kvaser USB vendor id. */ #define KVASER_VENDOR_ID 0x0bfd @@ -869,7 +871,7 @@ static void kvaser_usb_disconnect(struct usb_interface *intf) } static struct usb_driver kvaser_usb_driver = { - .name = "kvaser_usb", + .name = DRV_NAME, .probe = kvaser_usb_probe, .disconnect = kvaser_usb_disconnect, .id_table = kvaser_usb_table, -- 2.35.1