Skip to contentSkip to conversation

devfreq: constify of_device_id array

PATCH MyungJoo Ham 1 participant 1 message Mar 17, 2015

Subsystems (2)
lore
Share & tools
lore

MyungJoo Ham

author Acked-by
#0 lore raw
Quoted 4 lines

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

Quoted 35 lines
---
 drivers/devfreq/event/exynos-ppmu.c | 2 +-
 drivers/devfreq/tegra-devfreq.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/devfreq/event/exynos-ppmu.c +1 -1
index ad83473..5afb851 100644
@@ -354,7 +354,7 @@ static int exynos_ppmu_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id exynos_ppmu_id_match[] = {
+static const struct of_device_id exynos_ppmu_id_match[] = {
 	{ .compatible = "samsung,exynos-ppmu", },
 	{ /* sentinel */ },
 };
drivers/devfreq/tegra-devfreq.c +1 -1
index 3479096..244d8db 100644
@@ -695,7 +695,7 @@ static SIMPLE_DEV_PM_OPS(tegra_devfreq_pm_ops,
 			 tegra_devfreq_suspend,
 			 tegra_devfreq_resume);
 
-static struct of_device_id tegra_devfreq_of_match[] = {
+static const struct of_device_id tegra_devfreq_of_match[] = {
 	{ .compatible = "nvidia,tegra124-actmon" },
 	{ },
 };
Signature · 1 line
2.1.0