public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] fix compilation in collie.c
@ 2005-07-21  5:25 Pavel Machek
  2005-07-24 22:35 ` Russell King
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2005-07-21  5:25 UTC (permalink / raw)
  To: rpurdie, Russell King, lenz, kernel list

This fixes wrong number of arguments in call to write_scoop_reg, fixes
map_name and John's email. Please apply,

Signed-off-by: Pavel Machek <pavel@suse.cz>

diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -11,7 +11,7 @@
  * published by the Free Software Foundation.
  *
  * ChangeLog:
- *  03-06-2004 John Lenz <jelenz@wisc.edu>
+ *  03-06-2004 John Lenz <lenz@cs.wisc.edu>
  *  06-04-2002 Chris Larson <kergoth@digitalnemesis.net>
  *  04-16-2001 Lineo Japan,Inc. ...
  */
@@ -111,16 +180,16 @@ static struct mtd_partition collie_parti
 
 static void collie_set_vpp(int vpp)
 {
-	write_scoop_reg(SCOOP_GPCR, read_scoop_reg(SCOOP_GPCR) | COLLIE_SCP_VPEN);
+	write_scoop_reg(NULL, SCOOP_GPCR, read_scoop_reg(NULL, SCOOP_GPCR) | COLLIE_SCP_VPEN);
 	if (vpp) {
-		write_scoop_reg(SCOOP_GPWR, read_scoop_reg(SCOOP_GPWR) | COLLIE_SCP_VPEN);
+		write_scoop_reg(NULL, SCOOP_GPWR, read_scoop_reg(NULL, SCOOP_GPWR) | COLLIE_SCP_VPEN);
 	} else {
-		write_scoop_reg(SCOOP_GPWR, read_scoop_reg(SCOOP_GPWR) & ~COLLIE_SCP_VPEN);
+		write_scoop_reg(NULL, SCOOP_GPWR, read_scoop_reg(NULL, SCOOP_GPWR) & ~COLLIE_SCP_VPEN);
 	}
 }
 
 static struct flash_platform_data collie_flash_data = {
-	.map_name	= "cfi_probe",
+	.map_name	= "sharp",
 	.set_vpp	= collie_set_vpp,
 	.parts		= collie_partitions,
 	.nr_parts	= ARRAY_SIZE(collie_partitions),

-- 
teflon -- maybe it is a trademark, but it should not be.

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

* Re: [patch] fix compilation in collie.c
  2005-07-21  5:25 [patch] fix compilation in collie.c Pavel Machek
@ 2005-07-24 22:35 ` Russell King
  2005-07-24 23:02   ` Richard Purdie
  2005-07-25  2:58   ` Pavel Machek
  0 siblings, 2 replies; 4+ messages in thread
From: Russell King @ 2005-07-24 22:35 UTC (permalink / raw)
  To: Pavel Machek; +Cc: rpurdie, lenz, kernel list

On Thu, Jul 21, 2005 at 07:25:27AM +0200, Pavel Machek wrote:
> This fixes wrong number of arguments in call to write_scoop_reg, fixes
> map_name and John's email. Please apply,
> 
> Signed-off-by: Pavel Machek <pavel@suse.cz>

Nacked.

I'd like John (or someone) to look at this.  I'm particularly worred
about:

1. passing NULL into (read|write)_scoop_reg() - which use dev_get_drvdata()
   on this.  Given the choice between creating code which will definitely
   oops but not error or warn vs not compiling, I'll take not compiling
   any day.

2. whether this is supposed to be using the sharp chip driver rather
   than the cfi stuff.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

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

* Re: [patch] fix compilation in collie.c
  2005-07-24 22:35 ` Russell King
@ 2005-07-24 23:02   ` Richard Purdie
  2005-07-25  2:58   ` Pavel Machek
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2005-07-24 23:02 UTC (permalink / raw)
  To: Russell King; +Cc: Pavel Machek, lenz, kernel list

On Sun, 2005-07-24 at 23:35 +0100, Russell King wrote:
> I'd like John (or someone) to look at this.  I'm particularly worred
> about:
> 
> 1. passing NULL into (read|write)_scoop_reg() - which use dev_get_drvdata()
>    on this.  Given the choice between creating code which will definitely
>    oops but not error or warn vs not compiling, I'll take not compiling
>    any day.

They should read write_scoop_reg(&colliescoop_device.dev, ...); in this
case. 

There is a similar problem with drivers/input/keyboard/corgikbd.c for
which the patch has been in the input maintainer's queue for months :-(.

> 2. whether this is supposed to be using the sharp chip driver rather
>    than the cfi stuff.

I think the aim was to use the cfi code but there were problems with it
not working so the sharp chip driver was being used in the meantime.
John will hopefully be able to comment more about this.

Richard


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

* Re: [patch] fix compilation in collie.c
  2005-07-24 22:35 ` Russell King
  2005-07-24 23:02   ` Richard Purdie
@ 2005-07-25  2:58   ` Pavel Machek
  1 sibling, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2005-07-25  2:58 UTC (permalink / raw)
  To: rpurdie, lenz, kernel list

This fixes wrong number of arguments in call to write_scoop_reg and
John's email. Please apply,
							Pavel

Signed-off-by: Pavel Machek <pavel@suse.cz>

diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -11,7 +11,7 @@
  * published by the Free Software Foundation.
  *
  * ChangeLog:
- *  03-06-2004 John Lenz <jelenz@wisc.edu>
+ *  03-06-2004 John Lenz <lenz@cs.wisc.edu>
  *  06-04-2002 Chris Larson <kergoth@digitalnemesis.net>
  *  04-16-2001 Lineo Japan,Inc. ...
  */
@@ -111,16 +180,18 @@ static struct mtd_partition collie_parti
 
 static void collie_set_vpp(int vpp)
 {
-	write_scoop_reg(SCOOP_GPCR, read_scoop_reg(SCOOP_GPCR) | COLLIE_SCP_VPEN);
+	struct device *dev = &colliescoop_device.dev;
+
+	write_scoop_reg(dev, SCOOP_GPCR, read_scoop_reg(dev, SCOOP_GPCR) | COLLIE_SCP_VPEN);
 	if (vpp) {
-		write_scoop_reg(SCOOP_GPWR, read_scoop_reg(SCOOP_GPWR) | COLLIE_SCP_VPEN);
+		write_scoop_reg(dev, SCOOP_GPWR, read_scoop_reg(dev, SCOOP_GPWR) | COLLIE_SCP_VPEN);
 	} else {
-		write_scoop_reg(SCOOP_GPWR, read_scoop_reg(SCOOP_GPWR) & ~COLLIE_SCP_VPEN);
+		write_scoop_reg(dev, SCOOP_GPWR, read_scoop_reg(dev, SCOOP_GPWR) & ~COLLIE_SCP_VPEN);
 	}
 }
 
 static struct flash_platform_data collie_flash_data = {
 	.map_name	= "cfi_probe",
 	.set_vpp	= collie_set_vpp,
 	.parts		= collie_partitions,
 	.nr_parts	= ARRAY_SIZE(collie_partitions),

-- 
teflon -- maybe it is a trademark, but it should not be.

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

end of thread, other threads:[~2005-07-25  2:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-21  5:25 [patch] fix compilation in collie.c Pavel Machek
2005-07-24 22:35 ` Russell King
2005-07-24 23:02   ` Richard Purdie
2005-07-25  2:58   ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox