* [PATCH] powerpc: 4xx: constify platform_suspend_ops
@ 2017-08-30 16:48 Arvind Yadav
2017-09-01 13:29 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-30 16:48 UTC (permalink / raw)
To: mpe, paulus, benh; +Cc: linux-kernel, linuxppc-dev
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/powerpc/sysdev/ppc4xx_cpm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/sysdev/ppc4xx_cpm.c b/arch/powerpc/sysdev/ppc4xx_cpm.c
index ba95adf..6483675 100644
--- a/arch/powerpc/sysdev/ppc4xx_cpm.c
+++ b/arch/powerpc/sysdev/ppc4xx_cpm.c
@@ -240,7 +240,7 @@ static int cpm_suspend_enter(suspend_state_t state)
return 0;
}
-static struct platform_suspend_ops cpm_suspend_ops = {
+static const struct platform_suspend_ops cpm_suspend_ops = {
.valid = cpm_suspend_valid,
.enter = cpm_suspend_enter,
};
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: powerpc: 4xx: constify platform_suspend_ops
2017-08-30 16:48 [PATCH] powerpc: 4xx: constify platform_suspend_ops Arvind Yadav
@ 2017-09-01 13:29 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2017-09-01 13:29 UTC (permalink / raw)
To: Arvind Yadav, paulus, benh; +Cc: linuxppc-dev, linux-kernel
On Wed, 2017-08-30 at 16:48:20 UTC, 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 to powerpc next, thanks.
https://git.kernel.org/powerpc/c/7def9a2418430a8af2a56023769ccd
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-01 13:30 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:48 [PATCH] powerpc: 4xx: constify platform_suspend_ops Arvind Yadav
2017-09-01 13:29 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®