[patch] 2.4.25-rc1: amd7930_fn doesn't compile

From: Adrian Bunk
Date: Fri Feb 06 2004 - 13:02:53 EST


On Thu, Feb 05, 2004 at 10:44:31AM -0200, Marcelo Tosatti wrote:
>...
> Summary of changes from v2.4.25-pre8 to v2.4.25-rc1
> ============================================
>...
> Luca Tettamanti:
>...
> o Fix amd7930_fn.h compilation warning
>...

This causes the following compile error when trying to compile this
driver statically into a kernel with CONFIG_HOTPLUG=n :

<-- snip -->

...
gcc -D__KERNEL__
-I/home/bunk/linux/kernel-2.4/linux-2.4.25-rc1-full-no-hotplug/include
-Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing
-fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2
-march=athlon -DHISAX_MAX_CARDS=8 -nostdinc -iwithprefix include
-DKBUILD_BASENAME=amd7930_fn -c -o amd7930_fn.o amd7930_fn.c
amd7930_fn.c: In function `Amd7930_init':
amd7930_fn.c:752: error: Amd7930_init causes a section type conflict
{standard input}: Assembler messages:
{standard input}:2: Warning: setting incorrect section attributes for .text.init
make[4]: *** [amd7930_fn.o] Error 1
make[4]: Leaving directory `/home/bunk/linux/kernel-2.4/linux-2.4.25-rc1-full-no-hotplug/drivers/isdn/hisax'

<-- snip -->


The fix is obvious:


--- linux-2.4.25-rc1-full-no-hotplug/drivers/isdn/hisax/amd7930_fn.c.old 2004-02-06 00:37:28.000000000 +0100
+++ linux-2.4.25-rc1-full-no-hotplug/drivers/isdn/hisax/amd7930_fn.c 2004-02-06 00:37:56.000000000 +0100
@@ -61,7 +61,7 @@
#include <linux/interrupt.h>
#include <linux/init.h>

-static WORD initAMD[] __devinit = {
+static WORD initAMD[] __devinitdata = {
0x0100,

0x00A5, 3, 0x01, 0x40, 0x58, // LPR, LMR1, LMR2


cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/