Loading arch/sh/mm/pmb.c +14 −29 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * * Privileged Space Mapping Buffer (PMB) Support. * * Copyright (C) 2005 - 2010 Paul Mundt * Copyright (C) 2005 - 2011 Paul Mundt * Copyright (C) 2010 Matt Fleming * * This file is subject to the terms and conditions of the GNU General Public Loading @@ -12,7 +12,7 @@ */ #include <linux/init.h> #include <linux/kernel.h> #include <linux/sysdev.h> #include <linux/syscore_ops.h> #include <linux/cpu.h> #include <linux/module.h> #include <linux/bitops.h> Loading Loading @@ -874,15 +874,10 @@ static int __init pmb_debugfs_init(void) subsys_initcall(pmb_debugfs_init); #ifdef CONFIG_PM static int pmb_sysdev_suspend(struct sys_device *dev, pm_message_t state) static void pmb_syscore_resume(void) { static pm_message_t prev_state; int i; /* Restore the PMB after a resume from hibernation */ if (state.event == PM_EVENT_ON && prev_state.event == PM_EVENT_FREEZE) { struct pmb_entry *pmbe; int i; read_lock(&pmb_rwlock); Loading @@ -896,24 +891,14 @@ static int pmb_sysdev_suspend(struct sys_device *dev, pm_message_t state) read_unlock(&pmb_rwlock); } prev_state = state; return 0; } static int pmb_sysdev_resume(struct sys_device *dev) { return pmb_sysdev_suspend(dev, PMSG_ON); } static struct sysdev_driver pmb_sysdev_driver = { .suspend = pmb_sysdev_suspend, .resume = pmb_sysdev_resume, static struct syscore_ops pmb_syscore_ops = { .resume = pmb_syscore_resume, }; static int __init pmb_sysdev_init(void) { return sysdev_driver_register(&cpu_sysdev_class, &pmb_sysdev_driver); register_syscore_ops(&pmb_syscore_ops); return 0; } subsys_initcall(pmb_sysdev_init); #endif Loading
arch/sh/mm/pmb.c +14 −29 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * * Privileged Space Mapping Buffer (PMB) Support. * * Copyright (C) 2005 - 2010 Paul Mundt * Copyright (C) 2005 - 2011 Paul Mundt * Copyright (C) 2010 Matt Fleming * * This file is subject to the terms and conditions of the GNU General Public Loading @@ -12,7 +12,7 @@ */ #include <linux/init.h> #include <linux/kernel.h> #include <linux/sysdev.h> #include <linux/syscore_ops.h> #include <linux/cpu.h> #include <linux/module.h> #include <linux/bitops.h> Loading Loading @@ -874,15 +874,10 @@ static int __init pmb_debugfs_init(void) subsys_initcall(pmb_debugfs_init); #ifdef CONFIG_PM static int pmb_sysdev_suspend(struct sys_device *dev, pm_message_t state) static void pmb_syscore_resume(void) { static pm_message_t prev_state; int i; /* Restore the PMB after a resume from hibernation */ if (state.event == PM_EVENT_ON && prev_state.event == PM_EVENT_FREEZE) { struct pmb_entry *pmbe; int i; read_lock(&pmb_rwlock); Loading @@ -896,24 +891,14 @@ static int pmb_sysdev_suspend(struct sys_device *dev, pm_message_t state) read_unlock(&pmb_rwlock); } prev_state = state; return 0; } static int pmb_sysdev_resume(struct sys_device *dev) { return pmb_sysdev_suspend(dev, PMSG_ON); } static struct sysdev_driver pmb_sysdev_driver = { .suspend = pmb_sysdev_suspend, .resume = pmb_sysdev_resume, static struct syscore_ops pmb_syscore_ops = { .resume = pmb_syscore_resume, }; static int __init pmb_sysdev_init(void) { return sysdev_driver_register(&cpu_sysdev_class, &pmb_sysdev_driver); register_syscore_ops(&pmb_syscore_ops); return 0; } subsys_initcall(pmb_sysdev_init); #endif