Skip to contentSkip to conversation

fix saa7146 compilation on 2.6.8-rc1

PATCH In review [email protected] 3 participants 5 messages Jul 12, 2004 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix saa7146 compilation on 2.6.8-rc1

Hi,
this patch fixes a compilation error on 2.6.8-rc1. Here's the error:
drivers/media/common/saa7146_video.c:3: conflicting types for memory' include/asm-m68k/setup.h:365: previous declaration of memory' make[3]: *** [drivers/media/common/saa7146_video.o] Error 1

hth.

drivers/media/common/saa7146_video.c +6 -6
@@ -1,9 +1,9 @@
 #include <media/saa7146_vv.h>
 
-static int memory = 32;
+static int max_memory = 32;
 
-MODULE_PARM(memory,"i");
-MODULE_PARM_DESC(memory, "maximum memory usage for capture buffers (default: 32Mb)");
+MODULE_PARM(max_memory,"i");
+MODULE_PARM_DESC(max_memory, "maximum memory usage for capture buffers (default: 32Mb)");
 
 #define IS_CAPTURE_ACTIVE(fh) \
 	(((vv->video_status & STATUS_CAPTURE) != 0) && (vv->video_fh == fh))
@@ -1331,9 +1331,9 @@
 
 	*size = fh->video_fmt.sizeimage;
 
-	/* check if we exceed the "memory" parameter */
-	if( (*count * *size) > (memory*1048576) ) {
-		*count = (memory*1048576) / *size;
+	/* check if we exceed the "max_memory" parameter */
+	if( (*count * *size) > (max_memory*1048576) ) {
+		*count = (max_memory*1048576) / *size;
 	}
 	
 	DEB_CAP(("%d buffers, %d bytes each.\n",*count,*size));
#1 lore raw
Quoted 4 lines · On Mon, 12 Jul 2004 [email protected] wrote:

this patch fixes a compilation error on 2.6.8-rc1. Here's the error:
drivers/media/common/saa7146_video.c:3: conflicting types for memory' include/asm-m68k/setup.h:365: previous declaration of memory' make[3]: *** [drivers/media/common/saa7146_video.o] Error 1

But there's nothing named plain `memory' in include/asm-m68k/setup.h?!?!? Actually there never has been...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw
Quoted 9 lines · On Mon, 12 Jul 2004 [email protected] wrote:
Quoted 4 lines

this patch fixes a compilation error on 2.6.8-rc1. Here's the error:
drivers/media/common/saa7146_video.c:3: conflicting types for memory' include/asm-m68k/setup.h:365: previous declaration of memory' make[3]: *** [drivers/media/common/saa7146_video.o] Error 1

But there's nothing named plain `memory' in include/asm-m68k/setup.h?!?!? Actually there never has been...

Right, but (i should have specified, sorry), I compiled on ppc32, and there's

#define m68k_num_memory num_memory
#define m68k_memory memory
#include <asm-m68k/setup.h

in include/asm-ppc/setup.h.

Signature · 1 line
Colin
#3 lore raw
Quoted 9 lines · Colin LEROY
Quoted 8 lines · On Mon, 12 Jul 2004 [email protected] wrote:
Quoted 4 lines

this patch fixes a compilation error on 2.6.8-rc1. Here's the error:
drivers/media/common/saa7146_video.c:3: conflicting types for memory' include/asm-m68k/setup.h:365: previous declaration of memory' make[3]: *** [drivers/media/common/saa7146_video.o] Error 1

But there's nothing named plain `memory' in include/asm-m68k/setup.h?!?!? Actually there never has been...

Quoted 7 lines

Right, but (i should have specified, sorry), I compiled on ppc32, and there's

#define m68k_num_memory num_memory
#define m68k_memory memory
#include <asm-m68k/setup.h

in include/asm-ppc/setup.h.

Ah, didn't think of that (I should have known ;-)

Looks like the APUS code can need some clean up. E.g. arch/ppc/amiga/bootinfo.c operates on both memory and m68k_memory, while they are identical due to <asm/setup.h>...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#4 lore raw
In reply to [email protected]

Hello Linus, Andrew,

Quoted 4 lines · On 07/12/04 10:25, [email protected] wrote:

this patch fixes a compilation error on 2.6.8-rc1. Here's the error:
drivers/media/common/saa7146_video.c:3: conflicting types for memory' include/asm-m68k/setup.h:365: previous declaration of memory' make[3]: *** [drivers/media/common/saa7146_video.o] Error 1

Colin's patch is fine, an updated version of the patch with an additional signed-off line is attached.

Please apply. Thanks!

CU
Michael.

drivers/media/common/saa7146_video.c +6 -6
@@ -1,9 +1,9 @@
 #include <media/saa7146_vv.h>
 
-static int memory = 32;
+static int max_memory = 32;
 
-MODULE_PARM(memory,"i");
-MODULE_PARM_DESC(memory, "maximum memory usage for capture buffers (default: 32Mb)");
+MODULE_PARM(max_memory,"i");
+MODULE_PARM_DESC(max_memory, "maximum memory usage for capture buffers (default: 32Mb)");
 
 #define IS_CAPTURE_ACTIVE(fh) \
 	(((vv->video_status & STATUS_CAPTURE) != 0) && (vv->video_fh == fh))
@@ -1331,9 +1331,9 @@
 
 	*size = fh->video_fmt.sizeimage;
 
-	/* check if we exceed the "memory" parameter */
-	if( (*count * *size) > (memory*1048576) ) {
-		*count = (memory*1048576) / *size;
+	/* check if we exceed the "max_memory" parameter */
+	if( (*count * *size) > (max_memory*1048576) ) {
+		*count = (max_memory*1048576) / *size;
 	}
 	
 	DEB_CAP(("%d buffers, %d bytes each.\n",*count,*size));