Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

power: constify of_device_id array

of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)

Signed-off-by: Fabian Frederick <fabf@skynet.be>

[for vexpress]
Acked-by: Sudeep Holla <sudeep.holla@arm.com>

Signed-off-by: Sebastian Reichel <sre@kernel.org>

authored by

Fabian Frederick and committed by
Sebastian Reichel
8fb08855 039ab50b

+11 -11
+1 -1
drivers/power/charger-manager.c
··· 1484 1484 return ret; 1485 1485 } 1486 1486 1487 - static struct of_device_id charger_manager_match[] = { 1487 + static const struct of_device_id charger_manager_match[] = { 1488 1488 { 1489 1489 .compatible = "charger-manager", 1490 1490 },
+1 -1
drivers/power/reset/at91-poweroff.c
··· 140 140 return 0; 141 141 } 142 142 143 - static struct of_device_id at91_poweroff_of_match[] = { 143 + static const struct of_device_id at91_poweroff_of_match[] = { 144 144 { .compatible = "atmel,at91sam9260-shdwc", }, 145 145 { .compatible = "atmel,at91sam9rl-shdwc", }, 146 146 { .compatible = "atmel,at91sam9x5-shdwc", },
+2 -2
drivers/power/reset/at91-reset.c
··· 152 152 pr_info("AT91: Starting after %s\n", reason); 153 153 } 154 154 155 - static struct of_device_id at91_ramc_of_match[] = { 155 + static const struct of_device_id at91_ramc_of_match[] = { 156 156 { .compatible = "atmel,at91sam9260-sdramc", }, 157 157 { .compatible = "atmel,at91sam9g45-ddramc", }, 158 158 { .compatible = "atmel,sama5d3-ddramc", }, 159 159 { /* sentinel */ } 160 160 }; 161 161 162 - static struct of_device_id at91_reset_of_match[] = { 162 + static const struct of_device_id at91_reset_of_match[] = { 163 163 { .compatible = "atmel,at91sam9260-rstc", .data = at91sam9260_restart }, 164 164 { .compatible = "atmel,at91sam9g45-rstc", .data = at91sam9g45_restart }, 165 165 { /* sentinel */ }
+1 -1
drivers/power/reset/hisi-reboot.c
··· 64 64 return err; 65 65 } 66 66 67 - static struct of_device_id hisi_reboot_of_match[] = { 67 + static const struct of_device_id hisi_reboot_of_match[] = { 68 68 { .compatible = "hisilicon,sysctrl" }, 69 69 {} 70 70 };
+1 -1
drivers/power/reset/keystone-reset.c
··· 70 70 .priority = 128, 71 71 }; 72 72 73 - static struct of_device_id rsctrl_of_match[] = { 73 + static const struct of_device_id rsctrl_of_match[] = { 74 74 {.compatible = "ti,keystone-reset", }, 75 75 {}, 76 76 };
+1 -1
drivers/power/reset/st-poweroff.c
··· 97 97 .priority = 192, 98 98 }; 99 99 100 - static struct of_device_id st_reset_of_match[] = { 100 + static const struct of_device_id st_reset_of_match[] = { 101 101 { 102 102 .compatible = "st,stih415-restart", 103 103 .data = (void *)&stih415_reset,
+1 -1
drivers/power/reset/syscon-reboot.c
··· 76 76 return err; 77 77 } 78 78 79 - static struct of_device_id syscon_reboot_of_match[] = { 79 + static const struct of_device_id syscon_reboot_of_match[] = { 80 80 { .compatible = "syscon-reboot" }, 81 81 {} 82 82 };
+1 -1
drivers/power/reset/vexpress-poweroff.c
··· 80 80 81 81 enum vexpress_reset_func { FUNC_RESET, FUNC_SHUTDOWN, FUNC_REBOOT }; 82 82 83 - static struct of_device_id vexpress_reset_of_match[] = { 83 + static const struct of_device_id vexpress_reset_of_match[] = { 84 84 { 85 85 .compatible = "arm,vexpress-reset", 86 86 .data = (void *)FUNC_RESET,
+1 -1
drivers/power/reset/xgene-reboot.c
··· 87 87 return err; 88 88 } 89 89 90 - static struct of_device_id xgene_reboot_of_match[] = { 90 + static const struct of_device_id xgene_reboot_of_match[] = { 91 91 { .compatible = "apm,xgene-reboot" }, 92 92 {} 93 93 };
+1 -1
drivers/power/tps65090-charger.c
··· 349 349 return 0; 350 350 } 351 351 352 - static struct of_device_id of_tps65090_charger_match[] = { 352 + static const struct of_device_id of_tps65090_charger_match[] = { 353 353 { .compatible = "ti,tps65090-charger", }, 354 354 { /* end */ } 355 355 };