Skip to contentSkip to conversation

mfd: omap: remove useless cast for driver.name

PATCH Applied Corentin Labbe 2 participants 2 messages Feb 18, 2020 – Feb 26, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: omap: remove useless cast for driver.name

device_driver name is const char pointer, so it not useful to cast xx_driver_name (which is already const char).

---
 drivers/mfd/omap-usb-host.c | 2 +-
 drivers/mfd/omap-usb-tll.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/omap-usb-host.c +1 -1
index 4798d9f3f9d5..1f4f01b02d98 100644
@@ -840,7 +840,7 @@ MODULE_DEVICE_TABLE(of, usbhs_omap_dt_ids);
 
 static struct platform_driver usbhs_omap_driver = {
 	.driver = {
-		.name		= (char *)usbhs_driver_name,
+		.name		= usbhs_driver_name,
 		.pm		= &usbhsomap_dev_pm_ops,
 		.of_match_table = usbhs_omap_dt_ids,
 	},
drivers/mfd/omap-usb-tll.c +1 -1
index 265f5e350e1c..72f5a1cf867a 100644
@@ -304,7 +304,7 @@ MODULE_DEVICE_TABLE(of, usbtll_omap_dt_ids);
 
 static struct platform_driver usbtll_omap_driver = {
 	.driver = {
-		.name		= (char *)usbtll_driver_name,
+		.name		= usbtll_driver_name,
 		.of_match_table = usbtll_omap_dt_ids,
 	},
 	.probe		= usbtll_omap_probe,
Signature · 1 line
2.24.1
Applied
#1 lore raw
Quoted 8 lines · Corentin Labbe

device_driver name is const char pointer, so it not useful to cast xx_driver_name (which is already const char).

---
 drivers/mfd/omap-usb-host.c | 2 +-
 drivers/mfd/omap-usb-tll.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog