Commit 3628aa06 authored by David S. Miller's avatar David S. Miller

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: default avatarDavid S. Miller <davem@davemloft.net>
parent c897dcf6
...@@ -93,7 +93,7 @@ void auxio_set_lte(int on) ...@@ -93,7 +93,7 @@ void auxio_set_lte(int on)
} }
EXPORT_SYMBOL(auxio_set_lte); EXPORT_SYMBOL(auxio_set_lte);
static struct of_device_id __initdata auxio_match[] = { static const struct of_device_id auxio_match[] = {
{ {
.name = "auxio", .name = "auxio",
}, },
......
...@@ -140,7 +140,7 @@ static int __devinit clock_board_probe(struct platform_device *op) ...@@ -140,7 +140,7 @@ static int __devinit clock_board_probe(struct platform_device *op)
goto out; goto out;
} }
static struct of_device_id __initdata clock_board_match[] = { static const struct of_device_id clock_board_match[] = {
{ {
.name = "clock-board", .name = "clock-board",
}, },
...@@ -245,7 +245,7 @@ static int __devinit fhc_probe(struct platform_device *op) ...@@ -245,7 +245,7 @@ static int __devinit fhc_probe(struct platform_device *op)
goto out; goto out;
} }
static struct of_device_id __initdata fhc_match[] = { static const struct of_device_id fhc_match[] = {
{ {
.name = "fhc", .name = "fhc",
}, },
......
...@@ -1218,7 +1218,7 @@ static int ds_remove(struct vio_dev *vdev) ...@@ -1218,7 +1218,7 @@ static int ds_remove(struct vio_dev *vdev)
return 0; return 0;
} }
static struct vio_device_id __initdata ds_match[] = { static const struct vio_device_id ds_match[] = {
{ {
.type = "domain-services-port", .type = "domain-services-port",
}, },
......
...@@ -107,7 +107,7 @@ static struct mdesc_handle * __init mdesc_memblock_alloc(unsigned int mdesc_size ...@@ -107,7 +107,7 @@ static struct mdesc_handle * __init mdesc_memblock_alloc(unsigned int mdesc_size
return hp; return hp;
} }
static void mdesc_memblock_free(struct mdesc_handle *hp) static void __init mdesc_memblock_free(struct mdesc_handle *hp)
{ {
unsigned int alloc_size; unsigned int alloc_size;
unsigned long start; unsigned long start;
......
...@@ -496,7 +496,7 @@ static int __devinit fire_probe(struct platform_device *op) ...@@ -496,7 +496,7 @@ static int __devinit fire_probe(struct platform_device *op)
return err; return err;
} }
static struct of_device_id __initdata fire_match[] = { static const struct of_device_id fire_match[] = {
{ {
.name = "pci", .name = "pci",
.compatible = "pciex108e,80f0", .compatible = "pciex108e,80f0",
......
...@@ -592,7 +592,7 @@ static int __devinit psycho_probe(struct platform_device *op) ...@@ -592,7 +592,7 @@ static int __devinit psycho_probe(struct platform_device *op)
return err; return err;
} }
static struct of_device_id __initdata psycho_match[] = { static const struct of_device_id psycho_match[] = {
{ {
.name = "pci", .name = "pci",
.compatible = "pci108e,8000", .compatible = "pci108e,8000",
......
...@@ -581,7 +581,7 @@ static int __devinit sabre_probe(struct platform_device *op) ...@@ -581,7 +581,7 @@ static int __devinit sabre_probe(struct platform_device *op)
return err; return err;
} }
static struct of_device_id __initdata sabre_match[] = { static const struct of_device_id sabre_match[] = {
{ {
.name = "pci", .name = "pci",
.compatible = "pci108e,a001", .compatible = "pci108e,a001",
......
...@@ -1470,7 +1470,7 @@ static int __devinit schizo_probe(struct platform_device *op) ...@@ -1470,7 +1470,7 @@ static int __devinit schizo_probe(struct platform_device *op)
* and pci108e,8001. So list the chips in reverse chronological * and pci108e,8001. So list the chips in reverse chronological
* order. * order.
*/ */
static struct of_device_id __initdata schizo_match[] = { static const struct of_device_id schizo_match[] = {
{ {
.name = "pci", .name = "pci",
.compatible = "pci108e,a801", .compatible = "pci108e,a801",
......
...@@ -998,7 +998,7 @@ static int __devinit pci_sun4v_probe(struct platform_device *op) ...@@ -998,7 +998,7 @@ static int __devinit pci_sun4v_probe(struct platform_device *op)
return err; return err;
} }
static struct of_device_id __initdata pci_sun4v_match[] = { static const struct of_device_id pci_sun4v_match[] = {
{ {
.name = "pci", .name = "pci",
.compatible = "SUNW,sun4v-pci", .compatible = "SUNW,sun4v-pci",
......
...@@ -52,7 +52,7 @@ static int __devinit power_probe(struct platform_device *op) ...@@ -52,7 +52,7 @@ static int __devinit power_probe(struct platform_device *op)
return 0; return 0;
} }
static struct of_device_id __initdata power_match[] = { static const struct of_device_id power_match[] = {
{ {
.name = "power", .name = "power",
}, },
......
...@@ -442,7 +442,7 @@ static int __devinit rtc_probe(struct platform_device *op) ...@@ -442,7 +442,7 @@ static int __devinit rtc_probe(struct platform_device *op)
return platform_device_register(&rtc_cmos_device); 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", .name = "rtc",
.compatible = "m5819", .compatible = "m5819",
...@@ -487,7 +487,7 @@ static int __devinit bq4802_probe(struct platform_device *op) ...@@ -487,7 +487,7 @@ static int __devinit bq4802_probe(struct platform_device *op)
return platform_device_register(&rtc_bq4802_device); 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", .name = "rtc",
.compatible = "bq4802", .compatible = "bq4802",
...@@ -552,7 +552,7 @@ static int __devinit mostek_probe(struct platform_device *op) ...@@ -552,7 +552,7 @@ static int __devinit mostek_probe(struct platform_device *op)
return platform_device_register(&m48t59_rtc); return platform_device_register(&m48t59_rtc);
} }
static struct of_device_id __initdata mostek_match[] = { static const struct of_device_id mostek_match[] = {
{ {
.name = "eeprom", .name = "eeprom",
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment