diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2014-09-10 15:56:38 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2014-09-25 09:14:46 -0400 |
commit | ce6d73c94d7cfbdc3dc31860fe14af2f37d1b4fe (patch) | |
tree | 004b418dc22e1e6be5b8ba27d229a67a4ceee4df /arch/powerpc/sysdev | |
parent | d4fe0965e20820f3dd05bcc4d89de3da29bb83aa (diff) |
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>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/axonram.c | 2 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_85xx_l2ctlr.c | 2 | ||||
-rw-r--r-- | arch/powerpc/sysdev/mv64x60_dev.c | 2 | ||||
-rw-r--r-- | arch/powerpc/sysdev/pmi.c | 2 | ||||
-rw-r--r-- | arch/powerpc/sysdev/xilinx_intc.c | 2 | ||||
-rw-r--r-- | arch/powerpc/sysdev/xilinx_pci.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index 47b6b9f81d43..ad56edc39919 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c | |||
@@ -314,7 +314,7 @@ axon_ram_remove(struct platform_device *device) | |||
314 | return 0; | 314 | return 0; |
315 | } | 315 | } |
316 | 316 | ||
317 | static struct of_device_id axon_ram_device_id[] = { | 317 | static const struct of_device_id axon_ram_device_id[] = { |
318 | { | 318 | { |
319 | .type = "dma-memory" | 319 | .type = "dma-memory" |
320 | }, | 320 | }, |
diff --git a/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c b/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c index afc2dbf37011..90545ad1626e 100644 --- a/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c +++ b/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c | |||
@@ -171,7 +171,7 @@ static int mpc85xx_l2ctlr_of_remove(struct platform_device *dev) | |||
171 | return 0; | 171 | return 0; |
172 | } | 172 | } |
173 | 173 | ||
174 | static struct of_device_id mpc85xx_l2ctlr_of_match[] = { | 174 | static const struct of_device_id mpc85xx_l2ctlr_of_match[] = { |
175 | { | 175 | { |
176 | .compatible = "fsl,p2020-l2-cache-controller", | 176 | .compatible = "fsl,p2020-l2-cache-controller", |
177 | }, | 177 | }, |
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c index c2dba7db71ad..026bbc3b2c47 100644 --- a/arch/powerpc/sysdev/mv64x60_dev.c +++ b/arch/powerpc/sysdev/mv64x60_dev.c | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | /* These functions provide the necessary setup for the mv64x60 drivers. */ | 24 | /* These functions provide the necessary setup for the mv64x60 drivers. */ |
25 | 25 | ||
26 | static struct of_device_id __initdata of_mv64x60_devices[] = { | 26 | static const struct of_device_id of_mv64x60_devices[] __initconst = { |
27 | { .compatible = "marvell,mv64306-devctrl", }, | 27 | { .compatible = "marvell,mv64306-devctrl", }, |
28 | {} | 28 | {} |
29 | }; | 29 | }; |
diff --git a/arch/powerpc/sysdev/pmi.c b/arch/powerpc/sysdev/pmi.c index 5aaf86c03893..13e67d93a7c1 100644 --- a/arch/powerpc/sysdev/pmi.c +++ b/arch/powerpc/sysdev/pmi.c | |||
@@ -101,7 +101,7 @@ out: | |||
101 | } | 101 | } |
102 | 102 | ||
103 | 103 | ||
104 | static struct of_device_id pmi_match[] = { | 104 | static const struct of_device_id pmi_match[] = { |
105 | { .type = "ibm,pmi", .name = "ibm,pmi" }, | 105 | { .type = "ibm,pmi", .name = "ibm,pmi" }, |
106 | { .type = "ibm,pmi" }, | 106 | { .type = "ibm,pmi" }, |
107 | {}, | 107 | {}, |
diff --git a/arch/powerpc/sysdev/xilinx_intc.c b/arch/powerpc/sysdev/xilinx_intc.c index 83f943a8e0db..56f0524e47a6 100644 --- a/arch/powerpc/sysdev/xilinx_intc.c +++ b/arch/powerpc/sysdev/xilinx_intc.c | |||
@@ -265,7 +265,7 @@ static void __init xilinx_i8259_setup_cascade(void) | |||
265 | static inline void xilinx_i8259_setup_cascade(void) { return; } | 265 | static inline void xilinx_i8259_setup_cascade(void) { return; } |
266 | #endif /* defined(CONFIG_PPC_I8259) */ | 266 | #endif /* defined(CONFIG_PPC_I8259) */ |
267 | 267 | ||
268 | static struct of_device_id xilinx_intc_match[] __initconst = { | 268 | static const struct of_device_id xilinx_intc_match[] __initconst = { |
269 | { .compatible = "xlnx,opb-intc-1.00.c", }, | 269 | { .compatible = "xlnx,opb-intc-1.00.c", }, |
270 | { .compatible = "xlnx,xps-intc-1.00.a", }, | 270 | { .compatible = "xlnx,xps-intc-1.00.a", }, |
271 | {} | 271 | {} |
diff --git a/arch/powerpc/sysdev/xilinx_pci.c b/arch/powerpc/sysdev/xilinx_pci.c index 1453b0eed220..fea5667699ed 100644 --- a/arch/powerpc/sysdev/xilinx_pci.c +++ b/arch/powerpc/sysdev/xilinx_pci.c | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | #define PCI_HOST_ENABLE_CMD PCI_COMMAND_SERR | PCI_COMMAND_PARITY | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY | 28 | #define PCI_HOST_ENABLE_CMD PCI_COMMAND_SERR | PCI_COMMAND_PARITY | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY |
29 | 29 | ||
30 | static struct of_device_id xilinx_pci_match[] = { | 30 | static const struct of_device_id xilinx_pci_match[] = { |
31 | { .compatible = "xlnx,plbv46-pci-1.03.a", }, | 31 | { .compatible = "xlnx,plbv46-pci-1.03.a", }, |
32 | {} | 32 | {} |
33 | }; | 33 | }; |