From 3628aa0657e7bb3548a25fa3ea47510327d35efc Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Wed, 30 Mar 2011 17:37:56 -0700 Subject: sparc64: Fix section mis-match errors. Fix all of the problems spotted by CONFIG_DEBUG_SECTION_MISMATCH under arch/sparc during a 64-bit defconfig build. They fall into two categorites: 1) of_device_id is marked as __initdata, and we can never do this since these objects sit in the device core data structures way past boot. So even if a driver will never be reloaded, we have to keep the device ID table around. Mark such cases const instead. 2) The bootmem alloc/free handling code in mdesc.c was not fully marked __init as it should be, thus generating a reference to free_bootmem_late() (which is __init) from non-__init code. Signed-off-by: David S. Miller --- arch/sparc/kernel/time_64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/sparc/kernel/time_64.c') diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index 95ec25faba39..2b8d54b2d850 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c @@ -442,7 +442,7 @@ static int __devinit rtc_probe(struct platform_device *op) return platform_device_register(&rtc_cmos_device); } -static struct of_device_id __initdata rtc_match[] = { +static const struct of_device_id rtc_match[] = { { .name = "rtc", .compatible = "m5819", @@ -487,7 +487,7 @@ static int __devinit bq4802_probe(struct platform_device *op) return platform_device_register(&rtc_bq4802_device); } -static struct of_device_id __initdata bq4802_match[] = { +static const struct of_device_id bq4802_match[] = { { .name = "rtc", .compatible = "bq4802", @@ -552,7 +552,7 @@ static int __devinit mostek_probe(struct platform_device *op) return platform_device_register(&m48t59_rtc); } -static struct of_device_id __initdata mostek_match[] = { +static const struct of_device_id mostek_match[] = { { .name = "eeprom", }, -- cgit v1.2.1