diff options
| author | Chanwoo Choi <cw00.choi@samsung.com> | 2015-03-09 20:27:35 -0400 |
|---|---|---|
| committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2015-03-30 04:09:41 -0400 |
| commit | 6f240fbc474018872f6d9664a3bd350bd22cc8d9 (patch) | |
| tree | d5eacdee7518186c03221673e19f914facfafcbf | |
| parent | e42391cd048809d903291d07f86ed3934ce138e9 (diff) | |
PM / devfreq: event: Add const keyword for devfreq_event_ops structure
This patch adds the const keyword for devfreq_event_ops structure
because the ops of devfreq_event_desc structure should not be changed
after initialization.
Cc: Myungjoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
| -rw-r--r-- | drivers/devfreq/event/exynos-ppmu.c | 2 | ||||
| -rw-r--r-- | include/linux/devfreq-event.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c index ad8347385f53..7d99d13bacd8 100644 --- a/drivers/devfreq/event/exynos-ppmu.c +++ b/drivers/devfreq/event/exynos-ppmu.c | |||
| @@ -194,7 +194,7 @@ static int exynos_ppmu_get_event(struct devfreq_event_dev *edev, | |||
| 194 | return 0; | 194 | return 0; |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | static struct devfreq_event_ops exynos_ppmu_ops = { | 197 | static const struct devfreq_event_ops exynos_ppmu_ops = { |
| 198 | .disable = exynos_ppmu_disable, | 198 | .disable = exynos_ppmu_disable, |
| 199 | .set_event = exynos_ppmu_set_event, | 199 | .set_event = exynos_ppmu_set_event, |
| 200 | .get_event = exynos_ppmu_get_event, | 200 | .get_event = exynos_ppmu_get_event, |
diff --git a/include/linux/devfreq-event.h b/include/linux/devfreq-event.h index 602fbbfcfeed..0a83a1e648b0 100644 --- a/include/linux/devfreq-event.h +++ b/include/linux/devfreq-event.h | |||
| @@ -91,7 +91,7 @@ struct devfreq_event_desc { | |||
| 91 | const char *name; | 91 | const char *name; |
| 92 | void *driver_data; | 92 | void *driver_data; |
| 93 | 93 | ||
| 94 | struct devfreq_event_ops *ops; | 94 | const struct devfreq_event_ops *ops; |
| 95 | }; | 95 | }; |
| 96 | 96 | ||
| 97 | #if defined(CONFIG_PM_DEVFREQ_EVENT) | 97 | #if defined(CONFIG_PM_DEVFREQ_EVENT) |
