linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] atmel/spi: fix missing probe
@ 2011-11-03 17:41 Jean-Christophe PLAGNIOL-VILLARD
  2011-11-03 17:41 ` [PATCH 2/2] atmel/spi: fix section missmatch Jean-Christophe PLAGNIOL-VILLARD
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-11-03 17:41 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Grant Likely, spi-devel-general, Greg Kroah-Hartman,
	Jean-Christophe PLAGNIOL-VILLARD, Russell King - ARM Linux

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.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
---
v3:

	update commit message
 drivers/spi/spi-atmel.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 79665e2..3cd4f49 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -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);
-- 
1.7.7

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] atmel/spi: fix section missmatch
  2011-11-03 17:41 [PATCH 1/2] atmel/spi: fix missing probe Jean-Christophe PLAGNIOL-VILLARD
@ 2011-11-03 17:41 ` Jean-Christophe PLAGNIOL-VILLARD
       [not found] ` <1320342082-18573-1-git-send-email-plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
  2011-11-03 17:57 ` [PATCH 1/2 v4] " Jean-Christophe PLAGNIOL-VILLARD
  2 siblings, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-11-03 17:41 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: spi-devel-general, Jean-Christophe PLAGNIOL-VILLARD,
	Russell King - ARM Linux

atmel_spi_probe is marked __init where it's supposed to be __devinit

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
---
 drivers/spi/spi-atmel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 3cd4f49..1525262 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -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;
-- 
1.7.7

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] atmel/spi: fix missing probe
       [not found] ` <1320342082-18573-1-git-send-email-plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
@ 2011-11-03 17:50   ` Daniel Mack
  2011-11-03 17:56     ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Mack @ 2011-11-03 17:50 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Greg Kroah-Hartman, Russell King - ARM Linux,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On 11/03/2011 06:41 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> 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.
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD<plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
> Cc: Greg Kroah-Hartman<gregkh-l3A5Bk7waGM@public.gmane.org>
> Cc: Grant Likely<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> Cc: Russell King - ARM Linux<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
> ---
> v3:
>
> 	update commit message
>   drivers/spi/spi-atmel.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
> index 79665e2..3cd4f49 100644
> --- a/drivers/spi/spi-atmel.c
> +++ b/drivers/spi/spi-atmel.c
> @@ -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

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] atmel/spi: fix missing probe
  2011-11-03 17:50   ` [PATCH 1/2] atmel/spi: fix missing probe Daniel Mack
@ 2011-11-03 17:56     ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-11-03 17:56 UTC (permalink / raw)
  To: Daniel Mack
  Cc: Grant Likely, spi-devel-general, Greg Kroah-Hartman,
	Russell King - ARM Linux, linux-arm-kernel

On 18:50 Thu 03 Nov     , Daniel Mack wrote:
> On 11/03/2011 06:41 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> >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.
> >
> >Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD<plagnioj@jcrosoft.com>
> >Cc: Greg Kroah-Hartman<gregkh@suse.de>
> >Cc: Grant Likely<grant.likely@secretlab.ca>
> >Cc: Russell King - ARM Linux<linux@arm.linux.org.uk>
> >---
> >v3:
> >
> >	update commit message
> >  drivers/spi/spi-atmel.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >
> >diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
> >index 79665e2..3cd4f49 100644
> >--- a/drivers/spi/spi-atmel.c
> >+++ b/drivers/spi/spi-atmel.c
> >@@ -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?
I did I make the typo when editing the commit message before sending the
patch
Dame

Best Regards,
J.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2 v4] atmel/spi: fix missing probe
  2011-11-03 17:41 [PATCH 1/2] atmel/spi: fix missing probe Jean-Christophe PLAGNIOL-VILLARD
  2011-11-03 17:41 ` [PATCH 2/2] atmel/spi: fix section missmatch Jean-Christophe PLAGNIOL-VILLARD
       [not found] ` <1320342082-18573-1-git-send-email-plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
@ 2011-11-03 17:57 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-11-03 22:47   ` Russell King - ARM Linux
  2 siblings, 1 reply; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-11-03 17:57 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Grant Likely, spi-devel-general, Greg Kroah-Hartman,
	Jean-Christophe PLAGNIOL-VILLARD, Russell King - ARM Linux

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.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
---
v4:

	fix typo when editing commit message
 drivers/spi/spi-atmel.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 79665e2..3cd4f49 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -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);
-- 
1.7.7

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2 v4] atmel/spi: fix missing probe
  2011-11-03 17:57 ` [PATCH 1/2 v4] " Jean-Christophe PLAGNIOL-VILLARD
@ 2011-11-03 22:47   ` Russell King - ARM Linux
  0 siblings, 0 replies; 6+ messages in thread
From: Russell King - ARM Linux @ 2011-11-03 22:47 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: Grant Likely, spi-devel-general, Greg Kroah-Hartman,
	linux-arm-kernel

On Fri, Nov 04, 2011 at 01:57:40AM +0800, Jean-Christophe PLAGNIOL-VILLARD wrote:
> 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.

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-03 22:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-03 17:41 [PATCH 1/2] atmel/spi: fix missing probe Jean-Christophe PLAGNIOL-VILLARD
2011-11-03 17:41 ` [PATCH 2/2] atmel/spi: fix section missmatch Jean-Christophe PLAGNIOL-VILLARD
     [not found] ` <1320342082-18573-1-git-send-email-plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
2011-11-03 17:50   ` [PATCH 1/2] atmel/spi: fix missing probe Daniel Mack
2011-11-03 17:56     ` Jean-Christophe PLAGNIOL-VILLARD
2011-11-03 17:57 ` [PATCH 1/2 v4] " Jean-Christophe PLAGNIOL-VILLARD
2011-11-03 22:47   ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).