atmel/spi: fix missing probe during the switch to module_platform_driver
Subsystems (5)
PATCH 1/1 atmel/spi: fix missing probe during the switch to module_platform_driver
in commit 940ab889
--- arch/arm/mach-at91/include/mach/at91_aic.h | 2 +- drivers/spi/spi-atmel.c | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/mach-at91/include/mach/at91_aic.h +1 -1
@@ -20,7 +20,7 @@extern void __iomem *at91_aic_base;#define at91_aic_read (field) \ - __raw_read(at91_aic_base + field) + __raw_readl(at91_aic_base + field)#define at91_aic_write (field, value) \ __raw_writel(value, at91_aic_base + field);
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 1/1 atmel/spi: fix missing probe during the switch to module_platform_driver
Quoted 29 lines · Jean-Christophe PLAGNIOL-VILLARD
in commit
940ab889Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Grant Likely <[email protected]>Cc Nicolas Ferre <[email protected]>---
?arch/arm/mach-at91/include/mach/at91_aic.h | ? ?2 +- ?drivers/spi/spi-atmel.c ? ? ? ? ? ? ? ? ? ?| ? ?1 + ?2 files changed, 2 insertions(+), 1 deletions(-)arch/arm/mach-at91/include/mach/at91_aic.h +1
-1@@ -20,7 +20,7 @@ ?extern void __iomem *at91_aic_base; ?#define at91_aic_read(field) \ - ? ? ? __raw_read(at91_aic_base + field) + ? ? ? __raw_readl(at91_aic_base + field) ?#define at91_aic_write(field, value) \ ? ? ? ?__raw_writel(value, at91_aic_base + field);drivers/spi/spi-atmel.c +0
-0
drivers/spi/spi-atmel.c static struct platform_driver atmel_spi_driver = { · line 1078
Quoted 7 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, + ? ? ? .probe ? ? ? ? ?= atmel_spi_probe, ? ? ? ?.remove ? ? ? ? = __exit_p(atmel_spi_remove), ?}; ?module_platform_driver(atmel_spi_driver);
Jean,
This looks it should be two separate patches, one for the missing probe, one for the raw_read -> raw_readl.
Thanks,
~Deepak
PATCH 1/1 atmel/spi: fix missing probe during the switch to module_platform_driver
Quoted 41 lines · Deepak Saxena
Quoted 29 lines · Jean-Christophe PLAGNIOL-VILLARD
in commit
940ab889Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Grant Likely <[email protected]>Cc Nicolas Ferre <[email protected]>---
?arch/arm/mach-at91/include/mach/at91_aic.h | ? ?2 +- ?drivers/spi/spi-atmel.c ? ? ? ? ? ? ? ? ? ?| ? ?1 + ?2 files changed, 2 insertions(+), 1 deletions(-)arch/arm/mach-at91/include/mach/at91_aic.h +1
-1@@ -20,7 +20,7 @@ ?extern void __iomem *at91_aic_base; ?#define at91_aic_read(field) \ - ? ? ? __raw_read(at91_aic_base + field) + ? ? ? __raw_readl(at91_aic_base + field) ?#define at91_aic_write(field, value) \ ? ? ? ?__raw_writel(value, at91_aic_base + field);drivers/spi/spi-atmel.c +0
-0drivers/spi/spi-atmel.c static struct platform_driver atmel_spi_driver = { · line 1078
Quoted 7 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, + ? ? ? .probe ? ? ? ? ?= atmel_spi_probe, ? ? ? ?.remove ? ? ? ? = __exit_p(atmel_spi_remove), ?}; ?module_platform_driver(atmel_spi_driver);Jean,
Quoted 2 lines
This looks it should be two separate patches, one for the missing probe, one for the
raw_read->raw_readl.
Yes I found when I receive the e-mail and already send the v2
Best Regards,
J.
PATCH v2 1/1 atmel/spi: fix missing probe during the switch to module_platform_driver
In reply to Jean-Christophe PLAGNIOL-VILLARDin commit 940ab889
---
v2:
remove local work
Best Regards,
J.
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 v2 1/1 atmel/spi: fix missing probe during the switch to module_platform_driver
Quoted 1 line · Jean-Christophe PLAGNIOL-VILLARD
in commit
940ab889
This kind of commit message is, frankly, utter crap.
With all the complaints that have been on this mailing list about raw commit IDs without saying what the commit was, it completely astounds me that someone in your position (allegedly a co-maintainer of a SoC) would make such an error.
Please generate a much better commit message. Maybe something like:
----
Commit 940ab889 (blah blah blah) 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.
As atmel_spi_probe is marked __init, this will cause a section mismatch error, so ... <fill this in for the point below>
----
And, you're forgetting to fix this properly (maybe you don't care about section mismatch errors - are you going to create another patch for that as well?) Did you even build-test this patch and pay attention to any warnings issued, or were you just pleased to get a zImage at the end?
static int __init atmel_spi_probe(struct platform_device *pdev)
__init is not compatible with having a pointer in the platform driver structure. It needs to be __devinit.
PATCH v2 1/1 atmel/spi: fix missing probe during the switch to module_platform_driver
Quoted 27 lines · Russell King - ARM Linux
Quoted 1 line · Jean-Christophe PLAGNIOL-VILLARD
in commit
940ab889This kind of commit message is, frankly, utter crap.
With all the complaints that have been on this mailing list about raw commit IDs without saying what the commit was, it completely astounds me that someone in your position (allegedly a co-maintainer of a SoC) would make such an error.
Please generate a much better commit message. Maybe something like:
----
Commit940ab889(blah blah blah) 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.As
atmel_spi_probeis marked__init, this will cause a section mismatch error, so ... <fill this in for the point below>
----And, you're forgetting to fix this properly (maybe you don't care about section mismatch errors - are you going to create another patch for that as well?) Did you even build-test this patch and pay attention to any warnings issued, or were you just pleased to get a zImage at the end?
Quoted 4 lines
static int
__initatmel_spi_probe(struct platform_device *pdev)
__initis not compatible with having a pointer in the platform driver structure. It needs to be__devinit.
this is an other fix I do not want to fix 2 issue in one commit and I do care of mismatch erros I fix them all the time I send patch for some rm9200 few weeks ago
Best Regards,
J.
PATCH v2 1/1 atmel/spi: fix missing probe during the switch to module_platform_driver
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
this is an other fix I do not want to fix 2 issue in one commit and I do care of mismatch erros I fix them all the time I send patch for some rm9200 few weeks ago
It should not be a separate patch - it's all to do with fixing the original problem.
PATCH v2 1/1 atmel/spi: fix missing probe during the switch to module_platform_driver
Quoted 7 lines · Russell King - ARM Linux
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
this is an other fix I do not want to fix 2 issue in one commit and I do care of mismatch erros I fix them all the time I send patch for some rm9200 few weeks ago
It should not be a separate patch - it's all to do with fixing the original problem.
yes when we was supposed to swtch to module_platform_driver we use the .probe which is suposed to be __devinit in this case but I was prefering to do it in 2 steps
as you wish and I found that the remove is __exit and supposed to be __devexit
Best Regards,
J.
PATCH v2 1/1 atmel/spi: fix missing probe during the switch to module_platform_driver
Quoted 6 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 5 lines · Russell King - ARM Linux
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
this is an other fix I do not want to fix 2 issue in one commit and I do care of mismatch erros I fix them all the time I send patch for some rm9200 few weeks ago
Quoted 6 lines
Quoted 2 lines
It should not be a separate patch - it's all to do with fixing the original problem.
yes when we was supposed to swtch to
module_platform_driverwe use the .probe which is suposed to be__devinitin this case but I was prefering to do it in 2 steps
Then do the __devinit transformation _first_ so you don't introduce a new bug in the middle of your 'fix'.
But I personally think you're just creating needless churn by splitting this one logical change.