Message ID | 1582054383-35760-15-git-send-email-clabbe@baylibre.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | f7bcff35dcb32ecd7b82da510f650893053f3e28 |
Headers | show |
Series | usb: remove useless cast for driver.name | expand |
Hi, > From: Corentin Labbe, Sent: Wednesday, February 19, 2020 4:33 AM > > device_driver name is const char pointer, so it not useful to cast > udc_name (which is already const char). > > Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Thank you for the patch! Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Best regards, Yoshihiro Shimoda
diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c index c5c3c14df67a..42ae99ad9b25 100644 --- a/drivers/usb/gadget/udc/renesas_usb3.c +++ b/drivers/usb/gadget/udc/renesas_usb3.c @@ -2906,7 +2906,7 @@ static struct platform_driver renesas_usb3_driver = { .probe = renesas_usb3_probe, .remove = renesas_usb3_remove, .driver = { - .name = (char *)udc_name, + .name = udc_name, .pm = &renesas_usb3_pm_ops, .of_match_table = of_match_ptr(usb3_of_match), },
device_driver name is const char pointer, so it not useful to cast udc_name (which is already const char). Signed-off-by: Corentin Labbe <clabbe@baylibre.com> --- drivers/usb/gadget/udc/renesas_usb3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)