Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1723497 > unrolled thread

[PATCH] ARM: mxs: constify platform_suspend_ops

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-08-30 18:50 +0200
Last post2017-08-30 18:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] ARM: mxs: constify platform_suspend_ops Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-30 18:50 +0200

#1723497 — [PATCH] ARM: mxs: constify platform_suspend_ops

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-30 18:50 +0200
Subject[PATCH] ARM: mxs: constify platform_suspend_ops
Message-ID<ukelI-2il-27@gated-at.bofh.it>
platform_suspend_ops are not supposed to change at runtime.
Functions suspend_set_ops working with const platform_suspend_ops.
So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 arch/arm/mach-mxs/pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-mxs/pm.c b/arch/arm/mach-mxs/pm.c
index 0170e99..6ae057c 100644
--- a/arch/arm/mach-mxs/pm.c
+++ b/arch/arm/mach-mxs/pm.c
@@ -30,7 +30,7 @@ static int mxs_suspend_enter(suspend_state_t state)
 	return 0;
 }
 
-static struct platform_suspend_ops mxs_suspend_ops = {
+static const struct platform_suspend_ops mxs_suspend_ops = {
 	.enter = mxs_suspend_enter,
 	.valid = suspend_valid_only_mem,
 };
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web