Commit c143751a authored by Daniel Kurtz's avatar Daniel Kurtz Committed by Kukjin Kim

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: default avatarDaniel Kurtz <djkurtz@chromium.org>
Reviewed-by: default avatarTomasz Figa <t.figa@samsung.com>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent 53302222
...@@ -101,8 +101,8 @@ struct pm_uart_save { ...@@ -101,8 +101,8 @@ struct pm_uart_save {
/* helper functions to save/restore lists of registers. */ /* 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_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(const 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_core(const struct sleep_save *ptr, int count);
#ifdef CONFIG_SAMSUNG_PM #ifdef CONFIG_SAMSUNG_PM
extern int s3c_irq_wake(struct irq_data *data, unsigned int state); extern int s3c_irq_wake(struct irq_data *data, unsigned int state);
......
...@@ -182,7 +182,7 @@ void s3c_pm_do_save(struct sleep_save *ptr, int count) ...@@ -182,7 +182,7 @@ void s3c_pm_do_save(struct sleep_save *ptr, int count)
* restore the UARTs state yet * 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++) { for (; count > 0; count--, ptr++) {
printk(KERN_DEBUG "restore %p (restore %08lx, was %08x)\n", 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,7 +203,7 @@ void s3c_pm_do_restore(struct sleep_save *ptr, int count)
* peripherals, as things may be changing! * 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++) for (; count > 0; count--, ptr++)
__raw_writel(ptr->val, ptr->reg); __raw_writel(ptr->val, ptr->reg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment