]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
drivers/ide/pci/generic: fix build for CONFIG_HOTPLUG=n
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 26 Oct 2007 18:31:15 +0000 (20:31 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 26 Oct 2007 18:31:15 +0000 (20:31 +0200)
It turns out that const and __{dev}initdata cannot be mixed currently
and that generic IDE PCI host driver is also affected by the same issue:

On Thursday 25 October 2007, Ralf Baechle wrote:
>   CC      drivers/ide/pci/generic.o
> drivers/ide/pci/generic.c:52: error: __setup_str_ide_generic_all_on causes a
> +section type conflict

[ Also reported by Martijn Uffing <mp3project@sarijopen.student.utwente.nl>. ]

This patch workarounds the problem in a bit hackish way but without
removing const from generic_chipsets[] (it adds const to __setup() so
__setup_str_ide_generic_all becomes const).

Now all __{dev}initdata data in generic IDE PCI host driver are read-only
so it builds again (driver's .init.data section gets marked as READONLY).

Cc: Martijn Uffing <mp3project@sarijopen.student.utwente.nl>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/pci/generic.c

index f44d70852c3cc9c18efcb4bae6b75ba3294f2762..06885697ed7b95c444fcd961b9f067ad7d02b1ee 100644 (file)
@@ -49,7 +49,7 @@ static int __init ide_generic_all_on(char *unused)
        printk(KERN_INFO "IDE generic will claim all unknown PCI IDE storage controllers.\n");
        return 1;
 }
-__setup("all-generic-ide", ide_generic_all_on);
+const __setup("all-generic-ide", ide_generic_all_on);
 #endif
 module_param_named(all_generic_ide, ide_generic_all, bool, 0444);
 MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers.");