public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4.9-irda - compilation failure
@ 2001-08-17  9:51 Samium Gromoff
  2001-08-21  2:55 ` Keith Owens
  0 siblings, 1 reply; 2+ messages in thread
From: Samium Gromoff @ 2001-08-17  9:51 UTC (permalink / raw)
  To: linux-kernel

gcc-2.95.3

gcc -D__KERNEL__ -I/usr/src/linux-2.4.9/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i586    -c -o smc-ircc.o smc-ircc.c
smc-ircc.c: In function `smc_access':
smc-ircc.c:171: smc_access causes a section type conflict
smc-ircc.c: In function `smc_probe':
smc-ircc.c:183: smc_probe causes a section type conflict
smc-ircc.c: In function `smc_superio_fdc':
smc-ircc.c:343: smc_superio_fdc causes a section type conflict
smc-ircc.c: In function `smc_superio_lpc':
smc-ircc.c:357: smc_superio_lpc causes a section type conflict
smc-ircc.c: In function `ircc_init':
smc-ircc.c:379: ircc_init causes a section type conflict
smc-ircc.c: In function `ircc_open':
smc-ircc.c:420: ircc_open causes a section type conflict
make[4]: *** [smc-ircc.o] Error 1
make[4]: Leaving directory `/usr/src/linux-2.4.9/drivers/net/irda'



---


cheers,


   Samium Gromoff

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

* Re: 2.4.9-irda - compilation failure
  2001-08-17  9:51 2.4.9-irda - compilation failure Samium Gromoff
@ 2001-08-21  2:55 ` Keith Owens
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Owens @ 2001-08-21  2:55 UTC (permalink / raw)
  To: Samium Gromoff; +Cc: linux-kernel, Stefani Seibold, Dag Brattli, Thomas Davis

On Fri, 17 Aug 2001 13:51:46 +0400, 
"Samium Gromoff" <_deepfire@mail.ru> wrote:
>gcc -D__KERNEL__ -I/usr/src/linux-2.4.9/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i586    -c -o smc-ircc.o smc-ircc.c
>smc-ircc.c: In function `smc_access':
>smc-ircc.c:171: smc_access causes a section type conflict

Data must be __initdata, not __init, and cannot be const.  Also cleaned
up the MODULE tests, there is no need to wrap #ifdef MODULE around
module_author etc., the macros are no-op when built into the kernel.


diff -ur 2.4.9-pristine/drivers/net/irda/smc-ircc.c 2.4.9/drivers/net/irda/smc-ircc.c
--- 2.4.9-pristine/drivers/net/irda/smc-ircc.c	Tue Aug 21 11:51:06 2001
+++ 2.4.9/drivers/net/irda/smc-ircc.c	Tue Aug 21 12:45:08 2001
@@ -99,7 +99,7 @@
 #define	SERx4	8	/* SuperIO Chip supports 115,2 KBaud * 4=460,8 KBaud */
 
 /* These are the currently known SMC SuperIO chipsets */
-static const smc_chip_t __init fdc_chips_flat[]=
+static smc_chip_t __initdata fdc_chips_flat[]=
 {
 	/* Base address 0x3f0 or 0x370 */
 	{ "37C44",	KEY55_1|NoIRDA,		0x00, 0x00 }, /* This chip can not detected */
@@ -113,7 +113,7 @@
 	{ NULL }
 };
 
-static const smc_chip_t __init fdc_chips_paged[]=
+static smc_chip_t __initdata fdc_chips_paged[]=
 {
 	/* Base address 0x3f0 or 0x370 */
 	{ "37B72X",	KEY55_1|SIR|SERx4,	0x4c, 0x00 },
@@ -132,7 +132,7 @@
 	{ NULL }
 };
 
-static const smc_chip_t __init lpc_chips_flat[]=
+static smc_chip_t __initdata lpc_chips_flat[]=
 {
 	/* Base address 0x2E or 0x4E */
 	{ "47N227",	KEY55_1|FIR|SERx4,	0x5a, 0x00 },
@@ -140,7 +140,7 @@
 	{ NULL }
 };
 
-static const smc_chip_t __init lpc_chips_paged[]=
+static smc_chip_t __initdata lpc_chips_paged[]=
 {
 	/* Base address 0x2E or 0x4E */
 	{ "47B27X",	KEY55_1|SIR|SERx4,	0x51, 0x00 },
@@ -1147,17 +1147,15 @@
 	return 0;
 }
 
-#ifdef MODULE
-
 /*
  * Function ircc_close (self)
  *
  *    Close driver instance
  *
  */
-#ifdef MODULE
 static int __exit ircc_close(struct ircc_cb *self)
 {
+#ifdef MODULE
 	int iobase;
 
 	IRDA_DEBUG(0, __FUNCTION__ "\n");
@@ -1193,16 +1191,16 @@
 
 	kfree(self);
 
+#endif /* MODULE */
 	return 0;
 }
-#endif /* MODULE */
 
-int __init smc_init(void)
+static int __init smc_init(void)
 {
 	return ircc_init();
 }
 
-void __exit smc_cleanup(void)
+static void __exit smc_cleanup(void)
 {
 	int i;
 
@@ -1227,5 +1225,3 @@
 MODULE_PARM_DESC(ircc_fir, "FIR Base Address");
 MODULE_PARM(ircc_sir, "1-4i");
 MODULE_PARM_DESC(ircc_sir, "SIR Base Address");
-
-#endif /* MODULE */


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

end of thread, other threads:[~2001-08-21  2:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-17  9:51 2.4.9-irda - compilation failure Samium Gromoff
2001-08-21  2:55 ` Keith Owens

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