Skip to contentSkip to conversation

mtd: spi-nor: Remove unneeded driver.bus assignment

PATCH Applied Boris Brezillon 3 participants 3 messages Feb 14, 2018 – Mar 4, 2018

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

PATCH 1/1 mtd: spi-nor: Remove unneeded driver.bus assignment

platform_driver_register() takes care of assigning driver->bus to &platform_bus_type, no need to explicitly assign it in the driver.

---
 drivers/mtd/spi-nor/fsl-quadspi.c | 1 -
 1 file changed, 1 deletion(-)
drivers/mtd/spi-nor/fsl-quadspi.c +0 -1
index 2901c7bd9e30..dc9914fce296 100644
@@ -1174,7 +1174,6 @@ static int fsl_qspi_resume(struct platform_device *pdev)
 static struct platform_driver fsl_qspi_driver = {
 	.driver = {
 		.name	= "fsl-quadspi",
-		.bus	= &platform_bus_type,
 		.of_match_table = fsl_qspi_dt_ids,
 	},
 	.probe          = fsl_qspi_probe,
Signature · 1 line
2.14.1
Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines · Boris Brezillon

platform_driver_register() takes care of assigning driver->bus to &platform_bus_type, no need to explicitly assign it in the driver.

---
  drivers/mtd/spi-nor/fsl-quadspi.c | 1 -
  1 file changed, 1 deletion(-)
drivers/mtd/spi-nor/fsl-quadspi.c +0 -0
index 2901c7bd9e30..dc9914fce296 100644

drivers/mtd/spi-nor/fsl-quadspi.c static int fsl_qspi_resume(struct platform_device *pdev) · line 1179

Quoted 7 lines
drivers/mtd/spi-nor/fsl-quadspi.c +0 -1
@@ -1174,7 +1174,6 @@ static int fsl_qspi_resume(struct platform_device *pdev)
  static struct platform_driver fsl_qspi_driver = {
  	.driver = {
  		.name	= "fsl-quadspi",
-		.bus	= &platform_bus_type,
  		.of_match_table = fsl_qspi_dt_ids,
  	},
  	.probe          = fsl_qspi_probe,
#2 lore raw

Le 14/02/2018 à 17:09, Han Xu a écrit :

Quoted 7 lines · Boris Brezillon
Quoted 4 lines

platform_driver_register() takes care of assigning driver->bus to &platform_bus_type, no need to explicitly assign it in the driver.

Applied to the spi-nor/next branch of linux-mtd

Thanks!

Quoted 18 lines
Quoted 9 lines
---
  drivers/mtd/spi-nor/fsl-quadspi.c | 1 -
  1 file changed, 1 deletion(-)
drivers/mtd/spi-nor/fsl-quadspi.c +0 -0
index 2901c7bd9e30..dc9914fce296 100644

drivers/mtd/spi-nor/fsl-quadspi.c static int fsl_qspi_resume(struct platform_device *pdev) · line 1179

Quoted 7 lines
drivers/mtd/spi-nor/fsl-quadspi.c +0 -1
@@ -1174,7 +1174,6 @@ static int fsl_qspi_resume(struct platform_device *pdev)
  static struct platform_driver fsl_qspi_driver = {
  	.driver = {
  		.name	= "fsl-quadspi",
-		.bus	= &platform_bus_type,
  		.of_match_table = fsl_qspi_dt_ids,
  	},
  	.probe          = fsl_qspi_probe,