linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: djkurtz@chromium.org (Daniel Kurtz)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: SAMSUNG: Let s3c_pm_do_restore_*() take const sleep_save
Date: Thu, 21 Nov 2013 02:21:25 +0800	[thread overview]
Message-ID: <1384971686-7208-2-git-send-email-djkurtz@chromium.org> (raw)
In-Reply-To: <1384971686-7208-1-git-send-email-djkurtz@chromium.org>

The restore functions do not modify the passed in struct sleep_save,
so that parameter can be const.

This allows us to pass in const struct.  This allows us to use const
structs sleep_save to define system registers that will always be
restored to a constant value.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
---
 arch/arm/plat-samsung/include/plat/pm.h | 4 ++--
 arch/arm/plat-samsung/pm.c              | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h
index 6bc1a8f..ff6063f 100644
--- a/arch/arm/plat-samsung/include/plat/pm.h
+++ b/arch/arm/plat-samsung/include/plat/pm.h
@@ -101,8 +101,8 @@ struct pm_uart_save {
 /* helper functions to save/restore lists of registers. */
 
 extern void s3c_pm_do_save(struct sleep_save *ptr, int count);
-extern void s3c_pm_do_restore(struct sleep_save *ptr, int count);
-extern void s3c_pm_do_restore_core(struct sleep_save *ptr, int count);
+extern void s3c_pm_do_restore(const struct sleep_save *ptr, int count);
+extern void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count);
 
 #ifdef CONFIG_SAMSUNG_PM
 extern int s3c_irq_wake(struct irq_data *data, unsigned int state);
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index d0c2301..416e5be 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -182,7 +182,7 @@ void s3c_pm_do_save(struct sleep_save *ptr, int count)
  * restore the UARTs state yet
 */
 
-void s3c_pm_do_restore(struct sleep_save *ptr, int count)
+void s3c_pm_do_restore(const struct sleep_save *ptr, int count)
 {
 	for (; count > 0; count--, ptr++) {
 		printk(KERN_DEBUG "restore %p (restore %08lx, was %08x)\n",
@@ -203,7 +203,7 @@ void s3c_pm_do_restore(struct sleep_save *ptr, int count)
  * peripherals, as things may be changing!
 */
 
-void s3c_pm_do_restore_core(struct sleep_save *ptr, int count)
+void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count)
 {
 	for (; count > 0; count--, ptr++)
 		__raw_writel(ptr->val, ptr->reg);
-- 
1.8.4.1

  reply	other threads:[~2013-11-20 18:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20 18:21 [PATCH 1/3] ARM: EXYNOS: pmu: Constify data tables Daniel Kurtz
2013-11-20 18:21 ` Daniel Kurtz [this message]
2013-12-09 13:27   ` [PATCH 2/3] ARM: SAMSUNG: Let s3c_pm_do_restore_*() take const sleep_save Tomasz Figa
2013-11-20 18:21 ` [PATCH 3/3] ARM: EXYNOS: Constify clksrc immutable register restore tables Daniel Kurtz
2013-12-09 13:14 ` [PATCH 1/3] ARM: EXYNOS: pmu: Constify data tables Tomasz Figa
2013-12-09 16:11   ` Daniel Kurtz
2013-12-09 16:15     ` Tomasz Figa
2013-12-09 21:00       ` Kukjin Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1384971686-7208-2-git-send-email-djkurtz@chromium.org \
    --to=djkurtz@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).