atmel/spi: fix missing probe
Subsystems (3)
PATCH 1/2 atmel/spi: fix missing probe
Commit 940ab889 "drivercore: Add helper macro for platform_driver boilerplate" converted this driver to use module_platform_driver, but due to the use of platform_driver_probe(), this resulted in the call to atmel_spi_probe being lost. Place the call to this function into the driver structure.
---
v3:
update commit message
drivers/spi/spi-atmel.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/spi/spi-atmel.c +1 -0
@@ -1072,6 +1072,7 @@ static struct platform_driver atmel_spi_driver = { }, .suspend = atmel_spi_suspend, .resume = atmel_spi_resume, + .prove = atmel_spi_probe, .remove = __exit_p(atmel_spi_remove), };module_platform_driver (atmel_spi_driver);
Signature · 1 line
1.7.7
PATCH 2/2 atmel/spi: fix section missmatch
atmel_spi_probe is marked __init where it's supposed to be __devinit
--- drivers/spi/spi-atmel.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/spi/spi-atmel.c +1 -1
@@ -907,7 +907,7 @@ static void atmel_spi_cleanup(struct spi_device *spi)/*-------------------------------------------------------------------------*/ -static int __init atmel_spi_probe (struct platform_device *pdev) +static int __devinit atmel_spi_probe (struct platform_device *pdev) {struct resource *regs;int irq;
Signature · 1 line
1.7.7
PATCH 1/2 atmel/spi: fix missing probe
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 21 lines · Jean-Christophe PLAGNIOL-VILLARD
Commit
940ab889"drivercore: Add helper macro forplatform_driverboilerplate" converted this driver to usemodule_platform_driver, but due to the use ofplatform_driver_probe(), this resulted in the call toatmel_spi_probebeing lost. Place the call to this function into the driver structure.Signed-off-by Jean-Christophe PLAGNIOL-VILLARD<[email protected]>Cc Greg Kroah-Hartman<[email protected]>Cc Grant Likely<[email protected]>Cc Russell King - ARM Linux<[email protected]>---
v3:update commit message
drivers/spi/spi-atmel.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/spi/spi-atmel.c +0
-0
drivers/spi/spi-atmel.c static struct platform_driver atmel_spi_driver = { · line 1075
Quoted 4 lines
drivers/spi/spi-atmel.c +1
-0@@ -1072,6 +1072,7 @@ static struct platform_driver atmel_spi_driver = { }, .suspend = atmel_spi_suspend, .resume = atmel_spi_resume, + .prove = atmel_spi_probe,
^^^^^
This is certainly a typo. Didn't you even compile-test this?
Daniel
PATCH 1/2 atmel/spi: fix missing probe
Quoted 28 lines · Daniel Mack
Quoted 21 lines · Jean-Christophe PLAGNIOL-VILLARD
Commit
940ab889"drivercore: Add helper macro forplatform_driverboilerplate" converted this driver to usemodule_platform_driver, but due to the use ofplatform_driver_probe(), this resulted in the call toatmel_spi_probebeing lost. Place the call to this function into the driver structure.Signed-off-by Jean-Christophe PLAGNIOL-VILLARD<[email protected]>Cc Greg Kroah-Hartman<[email protected]>Cc Grant Likely<[email protected]>Cc Russell King - ARM Linux<[email protected]>---
v3:update commit message
drivers/spi/spi-atmel.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/spi/spi-atmel.c +0
-0drivers/spi/spi-atmel.c static struct platform_driver atmel_spi_driver = { · line 1075
Quoted 4 lines
drivers/spi/spi-atmel.c +1
-0@@ -1072,6 +1072,7 @@ static struct platform_driver atmel_spi_driver = { }, .suspend = atmel_spi_suspend, .resume = atmel_spi_resume, + .prove = atmel_spi_probe,^^^^^
Quoted 1 line
This is certainly a typo. Didn't you even compile-test this?
I did I make the typo when editing the commit message before sending the patch
Dame
Best Regards,
J.
PATCH v4 1/2 atmel/spi: fix missing probe
In reply to Jean-Christophe PLAGNIOL-VILLARDCommit 940ab889 "drivercore: Add helper macro for platform_driver boilerplate" converted this driver to use module_platform_driver, but due to the use of platform_driver_probe(), this resulted in the call to atmel_spi_probe being lost. Place the call to this function into the driver structure.
---
v4:
fix typo when editing commit message
drivers/spi/spi-atmel.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/spi/spi-atmel.c +1 -0
@@ -1072,6 +1072,7 @@ static struct platform_driver atmel_spi_driver = { }, .suspend = atmel_spi_suspend, .resume = atmel_spi_resume, + .probe = atmel_spi_probe, .remove = __exit_p(atmel_spi_remove), };module_platform_driver (atmel_spi_driver);
Signature · 1 line
1.7.7
PATCH v4 1/2 atmel/spi: fix missing probe
Quoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
Commit
940ab889"drivercore: Add helper macro forplatform_driverboilerplate" converted this driver to usemodule_platform_driver, but due to the use ofplatform_driver_probe(), this resulted in the call toatmel_spi_probebeing lost. Place the call to this function into the driver structure.
Let me say again, this should not be the first patch in the series. If you're trying to fix a bug don't introduce a new bug by fixing another bug.
If you did this with, say, the VM or FS subsystem, you'll have this patch reverted.
Moreover, it's bad practice to do "fixes" in this way, especially when it's trivial to do it _right_ as I've already mentioned several times.
I still maintain that it should be _one_ patch fixing these issues, not two.