Re: [PATCH 5/9] can: esd_usb: use KBUILD_MODNAME instead of hard coded name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26.07.2022 00:31:20, Vincent Mailhol wrote:
> The driver uses the string "ems_usb" to populate
> usb_driver::name. KBUILD_MODNAME also evaluates to "esd_ubs". Use
> KBUILD_MODNAME and get rid on the hardcoded string names.
> 
> CC: Frank Jungclaus <frank.jungclaus@xxxxxx>
> Signed-off-by: Vincent Mailhol <mailhol.vincent@xxxxxxxxxx>
> ---
>  drivers/net/can/usb/ems_usb.c | 4 ++--
>  drivers/net/can/usb/esd_usb.c | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c
> index 89a64e05cbd7..e86a2033db60 100644
> --- a/drivers/net/can/usb/ems_usb.c
> +++ b/drivers/net/can/usb/ems_usb.c
> @@ -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 = KBUILD_NAME,
> +	.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 = KBUILD_NAME,
> +	.name = KBUILD_MODNAME,

These 2 hunks should go into patch 2.

Marc

>  	.probe = ems_usb_probe,
>  	.disconnect = ems_usb_disconnect,
>  	.id_table = ems_usb_table,
> diff --git a/drivers/net/can/usb/esd_usb.c b/drivers/net/can/usb/esd_usb.c
> index 177ed33e08d9..7b849bd3cc9c 100644
> --- a/drivers/net/can/usb/esd_usb.c
> +++ b/drivers/net/can/usb/esd_usb.c
> @@ -1138,7 +1138,7 @@ static void esd_usb_disconnect(struct usb_interface *intf)
>  
>  /* usb specific object needed to register this driver with the usb subsystem */
>  static struct usb_driver esd_usb_driver = {
> -	.name = "esd_usb",
> +	.name = KBUILD_MODNAME,
>  	.probe = esd_usb_probe,
>  	.disconnect = esd_usb_disconnect,
>  	.id_table = esd_usb_table,
> -- 
> 2.35.1
> 
> 

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux