]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ARM: Fix section build warnings for AMBA drivers
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 27 Jul 2010 07:50:16 +0000 (08:50 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 27 Jul 2010 09:48:43 +0000 (10:48 +0100)
Found in the Versatile build:

WARNING: drivers/built-in.o(.data+0x14c): Section mismatch in reference from the variable pl061_gpio_driver to the (unknown reference) .init.data:(unknown)
The variable pl061_gpio_driver references
the (unknown reference) __initdata (unknown)

WARNING: drivers/built-in.o(.data+0x40f8): Section mismatch in reference from the variable pl011_driver to the (unknown reference) .init.data:(unknown)
The variable pl011_driver references
the (unknown reference) __initdata (unknown)

WARNING: drivers/built-in.o(.data+0x5ab4): Section mismatch in reference from the variable pl031_driver to the (unknown reference) .init.data:(unknown)
The variable pl031_driver references
the (unknown reference) __initdata (unknown)

Basically, amba_id structures must not be __initdata.  Also fix:

WARNING: drivers/built-in.o(.data+0x138): Section mismatch in reference from the variable pl061_gpio_driver to the function .init.text:pl061_probe()
The variable pl061_gpio_driver references
the function __init pl061_probe()

which is an incorrectly annotated probe function.  Fix it to reflect
the other AMBA bus probe functions by removing the __init attributation.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/gpio/pl061.c
drivers/rtc/rtc-pl031.c
drivers/serial/amba-pl010.c
drivers/serial/amba-pl011.c

index ee568c8fcbd01db804dc071be08a1da4b5ee6e87..5005990f751f44e142bbe7ec11869bc45efd9772 100644 (file)
@@ -232,7 +232,7 @@ static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
        desc->chip->unmask(irq);
 }
 
-static int __init pl061_probe(struct amba_device *dev, struct amba_id *id)
+static int pl061_probe(struct amba_device *dev, struct amba_id *id)
 {
        struct pl061_platform_data *pdata;
        struct pl061_gpio *chip;
@@ -333,7 +333,7 @@ free_mem:
        return ret;
 }
 
-static struct amba_id pl061_ids[] __initdata = {
+static struct amba_id pl061_ids[] = {
        {
                .id     = 0x00041061,
                .mask   = 0x000fffff,
index 3587d9922f2895832059f1ea1163e715750dd19a..71bbefc3544ee7782539083ace3ca2ea11931a1e 100644 (file)
@@ -456,7 +456,7 @@ static struct rtc_class_ops stv2_pl031_ops = {
        .irq_set_freq = pl031_irq_set_freq,
 };
 
-static struct amba_id pl031_ids[] __initdata = {
+static struct amba_id pl031_ids[] = {
        {
                .id = 0x00041031,
                .mask = 0x000fffff,
index b09a638d051fde98c37e52a58eb2cb9a25756663..50441ffe8e3856592dbfdae368e9891b64078d50 100644 (file)
@@ -782,7 +782,7 @@ static int pl010_resume(struct amba_device *dev)
        return 0;
 }
 
-static struct amba_id pl010_ids[] __initdata = {
+static struct amba_id pl010_ids[] = {
        {
                .id     = 0x00041010,
                .mask   = 0x000fffff,
index f67e09da6d33c79f4a2ba11f2fe39c4d831745aa..6ca7a44f29c205ef37c95318253e2592efaa459b 100644 (file)
@@ -930,7 +930,7 @@ static int pl011_resume(struct amba_device *dev)
 }
 #endif
 
-static struct amba_id pl011_ids[] __initdata = {
+static struct amba_id pl011_ids[] = {
        {
                .id     = 0x00041011,
                .mask   = 0x000fffff,