* [PATCH] ARM: mxs: constify platform_suspend_ops
@ 2017-08-30 16:47 Arvind Yadav
2017-09-22 5:01 ` Shawn Guo
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-30 16:47 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ARM: mxs: constify platform_suspend_ops
2017-08-30 16:47 [PATCH] ARM: mxs: constify platform_suspend_ops Arvind Yadav
@ 2017-09-22 5:01 ` Shawn Guo
0 siblings, 0 replies; 2+ messages in thread
From: Shawn Guo @ 2017-09-22 5:01 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Aug 30, 2017 at 10:17:51PM +0530, Arvind Yadav wrote:
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-22 5:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-30 16:47 [PATCH] ARM: mxs: constify platform_suspend_ops Arvind Yadav
2017-09-22 5:01 ` Shawn Guo
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).