diff options
author | Daniel Kurtz <djkurtz@chromium.org> | 2013-12-11 17:08:27 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2013-12-11 17:08:27 -0500 |
commit | c143751a6da99eaefa824745d87dcc71ec54e705 (patch) | |
tree | 06d621b21dec54c555fdf946fcafc7fbd89e57e4 /arch | |
parent | 53302222debe568bbfb27985eb97ffdfcf3bff24 (diff) |
ARM: SAMSUNG: Let s3c_pm_do_restore_*() take const sleep_save
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>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-samsung/include/plat/pm.h | 4 | ||||
-rw-r--r-- | 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 6bc1a8f471e3..ff6063f0d5ea 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 { | |||
101 | /* helper functions to save/restore lists of registers. */ | 101 | /* helper functions to save/restore lists of registers. */ |
102 | 102 | ||
103 | extern void s3c_pm_do_save(struct sleep_save *ptr, int count); | 103 | extern void s3c_pm_do_save(struct sleep_save *ptr, int count); |
104 | extern void s3c_pm_do_restore(struct sleep_save *ptr, int count); | 104 | extern void s3c_pm_do_restore(const struct sleep_save *ptr, int count); |
105 | extern void s3c_pm_do_restore_core(struct sleep_save *ptr, int count); | 105 | extern void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count); |
106 | 106 | ||
107 | #ifdef CONFIG_SAMSUNG_PM | 107 | #ifdef CONFIG_SAMSUNG_PM |
108 | extern int s3c_irq_wake(struct irq_data *data, unsigned int state); | 108 | 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 d0c23010b693..416e5bea54f9 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) | |||
182 | * restore the UARTs state yet | 182 | * restore the UARTs state yet |
183 | */ | 183 | */ |
184 | 184 | ||
185 | void s3c_pm_do_restore(struct sleep_save *ptr, int count) | 185 | void s3c_pm_do_restore(const struct sleep_save *ptr, int count) |
186 | { | 186 | { |
187 | for (; count > 0; count--, ptr++) { | 187 | for (; count > 0; count--, ptr++) { |
188 | printk(KERN_DEBUG "restore %p (restore %08lx, was %08x)\n", | 188 | 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) | |||
203 | * peripherals, as things may be changing! | 203 | * peripherals, as things may be changing! |
204 | */ | 204 | */ |
205 | 205 | ||
206 | void s3c_pm_do_restore_core(struct sleep_save *ptr, int count) | 206 | void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count) |
207 | { | 207 | { |
208 | for (; count > 0; count--, ptr++) | 208 | for (; count > 0; count--, ptr++) |
209 | __raw_writel(ptr->val, ptr->reg); | 209 | __raw_writel(ptr->val, ptr->reg); |