The driver uses the string "softing" to populate platform_driver::name and can_bittiming_const::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/softing/softing_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/softing/softing_main.c b/drivers/net/can/softing/softing_main.c index 8d27ac66ca7f..d810fe6915a4 100644 --- a/drivers/net/can/softing/softing_main.c +++ b/drivers/net/can/softing/softing_main.c @@ -11,6 +11,7 @@ #include "softing.h" +#define DRV_NAME "softing" #define TX_ECHO_SKB_MAX (((TXMAX+1)/2)-1) /* @@ -612,7 +613,7 @@ static const struct net_device_ops softing_netdev_ops = { }; static const struct can_bittiming_const softing_btr_const = { - .name = "softing", + .name = DRV_NAME, .tseg1_min = 1, .tseg1_max = 16, .tseg2_min = 1, @@ -846,7 +847,7 @@ static int softing_pdev_probe(struct platform_device *pdev) static struct platform_driver softing_driver = { .driver = { - .name = "softing", + .name = DRV_NAME, }, .probe = softing_pdev_probe, .remove = softing_pdev_remove, -- 2.35.1