LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] devfreq: event: Add 'const' keyword for devfreq_event_ops structure
@ 2015-03-10  0:27 Chanwoo Choi
  0 siblings, 0 replies; 2+ messages in thread
From: Chanwoo Choi @ 2015-03-10  0:27 UTC (permalink / raw)
  To: myungjoo.ham
  Cc: kyungmin.park, rafael.j.wysocki, kgene.kim, linux-kernel,
	linux-pm, linux-samsung-soc, linux-arm-kernel, Chanwoo Choi

This patch adds the 'const' keyword for devfreq_event_ops structure
because the ops of devfreq_event_desc structure shold 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>
---
 drivers/devfreq/event/exynos-ppmu.c | 2 +-
 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 ad83473..7d99d13 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,
 	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,
diff --git a/include/linux/devfreq-event.h b/include/linux/devfreq-event.h
index 602fbbf..0a83a1e 100644
--- a/include/linux/devfreq-event.h
+++ b/include/linux/devfreq-event.h
@@ -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)
-- 
1.8.5.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] devfreq: event: Add 'const' keyword for devfreq_event_ops structure
@ 2015-03-12  1:28 MyungJoo Ham
  0 siblings, 0 replies; 2+ messages in thread
From: MyungJoo Ham @ 2015-03-12  1:28 UTC (permalink / raw)
  To: 최찬우
  Cc: 박경민,
	rafael.j.wysocki, 김국진,
	linux-kernel, linux-pm, linux-samsung-soc, linux-arm-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 727 bytes --]

>   
>  This patch adds the 'const' keyword for devfreq_event_ops structure
> because the ops of devfreq_event_desc structure shold 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>
> ---
>  drivers/devfreq/event/exynos-ppmu.c | 2 +-
>  include/linux/devfreq-event.h       | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 

Merged with a little rephrasing.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>


ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-12  1:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-10  0:27 [PATCH] devfreq: event: Add 'const' keyword for devfreq_event_ops structure Chanwoo Choi
2015-03-12  1:28 MyungJoo Ham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).