Skip to contentSkip to conversation

mfd: at91-usart: do not use compatible to register child devices

PATCH Applied Codrin Ciubotariu 2 participants 2 messages Nov 3, 2020 – Nov 11, 2020

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

PATCH 1/1 mfd: at91-usart: do not use compatible to register child devices

There are no separate serial/SPI devices under the at91-usart MFD, but actually the MFD is used as a serial or a SPI device. There are no DT sub-nodes for the MFD children, so we should use platform device API to register the drivers.

---
 drivers/mfd/at91-usart.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/mfd/at91-usart.c +4 -8
index 6a8351a4588e..7f08cb60c58b 100644
@@ -15,15 +15,11 @@
 #include <linux/of.h>
 #include <linux/property.h>
 
-static const struct mfd_cell at91_usart_spi_subdev = {
-	.name = "at91_usart_spi",
-	.of_compatible = "microchip,at91sam9g45-usart-spi",
-};
+static const struct mfd_cell at91_usart_spi_subdev =
+	MFD_CELL_NAME("at91_usart_spi");
 
-static const struct mfd_cell at91_usart_serial_subdev = {
-	.name = "atmel_usart_serial",
-	.of_compatible = "atmel,at91rm9200-usart-serial",
-};
+static const struct mfd_cell at91_usart_serial_subdev =
+	MFD_CELL_NAME("atmel_usart_serial");
 
 static int at91_usart_mode_probe(struct platform_device *pdev)
 {
Signature · 1 line
2.25.1
Applied
#1 lore raw
Quoted 10 lines · Codrin Ciubotariu

There are no separate serial/SPI devices under the at91-usart MFD, but actually the MFD is used as a serial or a SPI device. There are no DT sub-nodes for the MFD children, so we should use platform device API to register the drivers.

---
 drivers/mfd/at91-usart.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

Applied, thanks.

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