Skip to content

Commit

Permalink
PM / devfreq: event: Add const keyword for devfreq_event_ops structure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chanwoo Choi authored and MyungJoo Ham committed Mar 30, 2015
1 parent e42391c commit 6f240fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/devfreq/event/exynos-ppmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ static int exynos_ppmu_get_event(struct devfreq_event_dev *edev,
return 0;
}

static struct devfreq_event_ops exynos_ppmu_ops = {
static const struct devfreq_event_ops exynos_ppmu_ops = {
.disable = exynos_ppmu_disable,
.set_event = exynos_ppmu_set_event,
.get_event = exynos_ppmu_get_event,
Expand Down
2 changes: 1 addition & 1 deletion include/linux/devfreq-event.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct devfreq_event_desc {
const char *name;
void *driver_data;

struct devfreq_event_ops *ops;
const struct devfreq_event_ops *ops;
};

#if defined(CONFIG_PM_DEVFREQ_EVENT)
Expand Down

0 comments on commit 6f240fb

Please sign in to comment.