powerpc: make of_device_ids const

of_device_ids (i.e. compatible strings and the respective data) are not
supposed to change at runtime. All functions working with of_device_ids
provided by <linux/of.h> work with const of_device_ids. This allows to
mark all struct of_device_id const, too.

While touching these line also put the __init annotation at the right
position where necessary.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Uwe Kleine-König
2014-09-10 21:56:38 +02:00
committato da Michael Ellerman
parent d4fe0965e2
commit ce6d73c94d
58 ha cambiato i file con 67 aggiunte e 67 eliminazioni

Vedi File

@@ -33,7 +33,7 @@
#define BCSR_USB_EN 0x11
static __initdata struct of_device_id ppc460ex_of_bus[] = {
static const struct of_device_id ppc460ex_of_bus[] __initconst = {
{ .compatible = "ibm,plb4", },
{ .compatible = "ibm,opb", },
{ .compatible = "ibm,ebc", },

Vedi File

@@ -28,7 +28,7 @@
#include <asm/pci-bridge.h>
#include <asm/ppc4xx.h>
static __initdata struct of_device_id ebony_of_bus[] = {
static const struct of_device_id ebony_of_bus[] __initconst = {
{ .compatible = "ibm,plb4", },
{ .compatible = "ibm,opb", },
{ .compatible = "ibm,ebc", },

Vedi File

@@ -32,7 +32,7 @@
#include <asm/mpic.h>
#include <asm/mmu.h>
static __initdata struct of_device_id iss4xx_of_bus[] = {
static const struct of_device_id iss4xx_of_bus[] __initconst = {
{ .compatible = "ibm,plb4", },
{ .compatible = "ibm,plb6", },
{ .compatible = "ibm,opb", },

Vedi File

@@ -24,7 +24,7 @@
#include <linux/init.h>
#include <linux/of_platform.h>
static __initdata struct of_device_id ppc44x_of_bus[] = {
static const struct of_device_id ppc44x_of_bus[] __initconst = {
{ .compatible = "ibm,plb4", },
{ .compatible = "ibm,opb", },
{ .compatible = "ibm,ebc", },

Vedi File

@@ -38,7 +38,7 @@
#include <linux/pci.h>
#include <linux/i2c.h>
static struct of_device_id ppc47x_of_bus[] __initdata = {
static const struct of_device_id ppc47x_of_bus[] __initconst = {
{ .compatible = "ibm,plb4", },
{ .compatible = "ibm,plb6", },
{ .compatible = "ibm,opb", },

Vedi File

@@ -29,7 +29,7 @@
#include <asm/ppc4xx.h>
#include <linux/i2c.h>
static __initdata struct of_device_id sam440ep_of_bus[] = {
static const struct of_device_id sam440ep_of_bus[] __initconst = {
{ .compatible = "ibm,plb4", },
{ .compatible = "ibm,opb", },
{ .compatible = "ibm,ebc", },

Vedi File

@@ -21,7 +21,7 @@
#include <asm/ppc4xx.h>
#include "44x.h"
static struct of_device_id xilinx_of_bus_ids[] __initdata = {
static const struct of_device_id xilinx_of_bus_ids[] __initconst = {
{ .compatible = "simple-bus", },
{ .compatible = "xlnx,plb-v46-1.00.a", },
{ .compatible = "xlnx,plb-v46-1.02.a", },

Vedi File

@@ -28,7 +28,7 @@
#include <asm/dma.h>
static __initdata struct of_device_id warp_of_bus[] = {
static const struct of_device_id warp_of_bus[] __initconst = {
{ .compatible = "ibm,plb4", },
{ .compatible = "ibm,opb", },
{ .compatible = "ibm,ebc", },