diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/common/sharpsl_pm.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-at91/pm.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap1/pm.c | 29 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm.c | 35 | ||||
-rw-r--r-- | arch/arm/mach-pnx4008/pm.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pm.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa25x.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa27x.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/pm.c | 6 | ||||
-rw-r--r-- | arch/arm/nwfpe/fpopcode.h | 6 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/pm.c | 6 |
11 files changed, 39 insertions, 75 deletions
diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c index 111a7fa5debe..5bba5255b119 100644 --- a/arch/arm/common/sharpsl_pm.c +++ b/arch/arm/common/sharpsl_pm.c @@ -24,6 +24,7 @@ #include <linux/platform_device.h> #include <linux/leds.h> #include <linux/apm-emulation.h> +#include <linux/suspend.h> #include <asm/hardware.h> #include <asm/mach-types.h> @@ -765,9 +766,9 @@ static void sharpsl_apm_get_power_status(struct apm_power_info *info) info->battery_life = sharpsl_pm.battstat.mainbat_percent; } -static struct pm_ops sharpsl_pm_ops = { +static struct platform_suspend_ops sharpsl_pm_ops = { .enter = corgi_pxa_pm_enter, - .valid = pm_valid_only_mem, + .valid = suspend_valid_only_mem, }; static int __init sharpsl_pm_probe(struct platform_device *pdev) @@ -799,7 +800,7 @@ static int __init sharpsl_pm_probe(struct platform_device *pdev) apm_get_power_status = sharpsl_apm_get_power_status; - pm_set_ops(&sharpsl_pm_ops); + suspend_set_ops(&sharpsl_pm_ops); mod_timer(&sharpsl_pm.ac_timer, jiffies + msecs_to_jiffies(250)); @@ -808,7 +809,7 @@ static int __init sharpsl_pm_probe(struct platform_device *pdev) static int sharpsl_pm_remove(struct platform_device *pdev) { - pm_set_ops(NULL); + suspend_set_ops(NULL); device_remove_file(&pdev->dev, &dev_attr_battery_percentage); device_remove_file(&pdev->dev, &dev_attr_battery_voltage); diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index ddf9184d561d..98cb61482917 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -10,10 +10,9 @@ * (at your option) any later version. */ -#include <linux/pm.h> +#include <linux/suspend.h> #include <linux/sched.h> #include <linux/proc_fs.h> -#include <linux/pm.h> #include <linux/interrupt.h> #include <linux/sysfs.h> #include <linux/module.h> @@ -199,7 +198,7 @@ error: } -static struct pm_ops at91_pm_ops ={ +static struct platform_suspend_ops at91_pm_ops ={ .valid = at91_pm_valid_state, .set_target = at91_pm_set_target, .enter = at91_pm_enter, @@ -220,7 +219,7 @@ static int __init at91_pm_init(void) /* Disable SDRAM low-power mode. Cannot be used with self-refresh. */ at91_sys_write(AT91_SDRAMC_LPR, 0); - pm_set_ops(&at91_pm_ops); + suspend_set_ops(&at91_pm_ops); return 0; } diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 089b8208de0e..3bf01e28df33 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -35,10 +35,9 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <linux/pm.h> +#include <linux/suspend.h> #include <linux/sched.h> #include <linux/proc_fs.h> -#include <linux/pm.h> #include <linux/interrupt.h> #include <linux/sysfs.h> #include <linux/module.h> @@ -600,27 +599,15 @@ static void (*saved_idle)(void) = NULL; /* * omap_pm_prepare - Do preliminary suspend work. - * @state: suspend state we're entering. * */ -static int omap_pm_prepare(suspend_state_t state) +static int omap_pm_prepare(void) { - int error = 0; - /* We cannot sleep in idle until we have resumed */ saved_idle = pm_idle; pm_idle = NULL; - switch (state) - { - case PM_SUSPEND_STANDBY: - case PM_SUSPEND_MEM: - break; - default: - return -EINVAL; - } - - return error; + return 0; } @@ -648,16 +635,14 @@ static int omap_pm_enter(suspend_state_t state) /** * omap_pm_finish - Finish up suspend sequence. - * @state: State we're coming out of. * * This is called after we wake back up (or if entering the sleep state * failed). */ -static int omap_pm_finish(suspend_state_t state) +static void omap_pm_finish(void) { pm_idle = saved_idle; - return 0; } @@ -674,11 +659,11 @@ static struct irqaction omap_wakeup_irq = { -static struct pm_ops omap_pm_ops ={ +static struct platform_suspend_ops omap_pm_ops ={ .prepare = omap_pm_prepare, .enter = omap_pm_enter, .finish = omap_pm_finish, - .valid = pm_valid_only_mem, + .valid = suspend_valid_only_mem, }; static int __init omap_pm_init(void) @@ -735,7 +720,7 @@ static int __init omap_pm_init(void) else if (cpu_is_omap16xx()) omap_writel(OMAP1610_IDLECT3_VAL, OMAP1610_IDLECT3); - pm_set_ops(&omap_pm_ops); + suspend_set_ops(&omap_pm_ops); #if defined(DEBUG) && defined(CONFIG_PROC_FS) omap_pm_init_proc(); diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 6f4a5436d0ce..baf7d82b458b 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -16,10 +16,9 @@ * published by the Free Software Foundation. */ -#include <linux/pm.h> +#include <linux/suspend.h> #include <linux/sched.h> #include <linux/proc_fs.h> -#include <linux/pm.h> #include <linux/interrupt.h> #include <linux/sysfs.h> #include <linux/module.h> @@ -71,28 +70,12 @@ void omap2_pm_idle(void) local_irq_enable(); } -static int omap2_pm_prepare(suspend_state_t state) +static int omap2_pm_prepare(void) { - int error = 0; - /* We cannot sleep in idle until we have resumed */ saved_idle = pm_idle; pm_idle = NULL; - - switch (state) - { - case PM_SUSPEND_STANDBY: - case PM_SUSPEND_MEM: - break; - - case PM_SUSPEND_DISK: - return -ENOTSUPP; - - default: - return -EINVAL; - } - - return error; + return 0; } #define INT0_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_GPIO_BANK1) | \ @@ -353,9 +336,6 @@ static int omap2_pm_enter(suspend_state_t state) case PM_SUSPEND_MEM: ret = omap2_pm_suspend(); break; - case PM_SUSPEND_DISK: - ret = -ENOTSUPP; - break; default: ret = -EINVAL; } @@ -363,17 +343,16 @@ static int omap2_pm_enter(suspend_state_t state) return ret; } -static int omap2_pm_finish(suspend_state_t state) +static void omap2_pm_finish(void) { pm_idle = saved_idle; - return 0; } -static struct pm_ops omap_pm_ops = { +static struct platform_suspend_ops omap_pm_ops = { .prepare = omap2_pm_prepare, .enter = omap2_pm_enter, .finish = omap2_pm_finish, - .valid = pm_valid_only_mem, + .valid = suspend_valid_only_mem, }; int __init omap2_pm_init(void) @@ -397,7 +376,7 @@ int __init omap2_pm_init(void) omap2_sram_suspend = omap_sram_push(omap24xx_cpu_suspend, omap24xx_cpu_suspend_sz); - pm_set_ops(&omap_pm_ops); + suspend_set_ops(&omap_pm_ops); pm_idle = omap2_pm_idle; pmdomain_init(); diff --git a/arch/arm/mach-pnx4008/pm.c b/arch/arm/mach-pnx4008/pm.c index 2a137f33f752..40116d254349 100644 --- a/arch/arm/mach-pnx4008/pm.c +++ b/arch/arm/mach-pnx4008/pm.c @@ -15,7 +15,7 @@ #include <linux/rtc.h> #include <linux/sched.h> #include <linux/proc_fs.h> -#include <linux/pm.h> +#include <linux/suspend.h> #include <linux/delay.h> #include <linux/clk.h> @@ -117,7 +117,7 @@ static int pnx4008_pm_valid(suspend_state_t state) (state == PM_SUSPEND_MEM); } -static struct pm_ops pnx4008_pm_ops = { +static struct platform_suspend_ops pnx4008_pm_ops = { .enter = pnx4008_pm_enter, .valid = pnx4008_pm_valid, }; @@ -146,7 +146,7 @@ static int __init pnx4008_pm_init(void) return -ENOMEM; } - pm_set_ops(&pnx4008_pm_ops); + suspend_set_ops(&pnx4008_pm_ops); return 0; } diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c index b59a81a8e7d3..a941c71c7d06 100644 --- a/arch/arm/mach-pxa/pm.c +++ b/arch/arm/mach-pxa/pm.c @@ -86,7 +86,7 @@ static int pxa_pm_valid(suspend_state_t state) return -EINVAL; } -static struct pm_ops pxa_pm_ops = { +static struct platform_suspend_ops pxa_pm_ops = { .valid = pxa_pm_valid, .enter = pxa_pm_enter, }; @@ -104,7 +104,7 @@ static int __init pxa_pm_init(void) return -ENOMEM; } - pm_set_ops(&pxa_pm_ops); + suspend_set_ops(&pxa_pm_ops); return 0; } diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 0d6a72504caa..dcd81f8d0833 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c @@ -20,7 +20,7 @@ #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h> -#include <linux/pm.h> +#include <linux/suspend.h> #include <asm/hardware.h> #include <asm/arch/irqs.h> @@ -215,7 +215,7 @@ static void pxa25x_cpu_pm_enter(suspend_state_t state) static struct pxa_cpu_pm_fns pxa25x_cpu_pm_fns = { .save_size = SLEEP_SAVE_SIZE, - .valid = pm_valid_only_mem, + .valid = suspend_valid_only_mem, .save = pxa25x_cpu_pm_save, .restore = pxa25x_cpu_pm_restore, .enter = pxa25x_cpu_pm_enter, diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 2d7fc39732e4..d0f2b597db12 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -14,7 +14,7 @@ #include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> -#include <linux/pm.h> +#include <linux/suspend.h> #include <linux/platform_device.h> #include <asm/hardware.h> diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c index 01a37d3c0727..246c573e7252 100644 --- a/arch/arm/mach-sa1100/pm.c +++ b/arch/arm/mach-sa1100/pm.c @@ -122,14 +122,14 @@ unsigned long sleep_phys_sp(void *sp) return virt_to_phys(sp); } -static struct pm_ops sa11x0_pm_ops = { +static struct platform_suspend_ops sa11x0_pm_ops = { .enter = sa11x0_pm_enter, - .valid = pm_valid_only_mem, + .valid = suspend_valid_only_mem, }; static int __init sa11x0_pm_init(void) { - pm_set_ops(&sa11x0_pm_ops); + suspend_set_ops(&sa11x0_pm_ops); return 0; } diff --git a/arch/arm/nwfpe/fpopcode.h b/arch/arm/nwfpe/fpopcode.h index ec78e3517fc9..0090b19bbe61 100644 --- a/arch/arm/nwfpe/fpopcode.h +++ b/arch/arm/nwfpe/fpopcode.h @@ -369,20 +369,20 @@ TABLE 5 #define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5) #ifdef CONFIG_FPE_NWFPE_XP -static inline __attribute_pure__ floatx80 getExtendedConstant(const unsigned int nIndex) +static inline floatx80 __pure getExtendedConstant(const unsigned int nIndex) { extern const floatx80 floatx80Constant[]; return floatx80Constant[nIndex]; } #endif -static inline __attribute_pure__ float64 getDoubleConstant(const unsigned int nIndex) +static inline float64 __pure getDoubleConstant(const unsigned int nIndex) { extern const float64 float64Constant[]; return float64Constant[nIndex]; } -static inline __attribute_pure__ float32 getSingleConstant(const unsigned int nIndex) +static inline float32 __pure getSingleConstant(const unsigned int nIndex) { extern const float32 float32Constant[]; return float32Constant[nIndex]; diff --git a/arch/arm/plat-s3c24xx/pm.c b/arch/arm/plat-s3c24xx/pm.c index eab1850616d8..4fdb3117744f 100644 --- a/arch/arm/plat-s3c24xx/pm.c +++ b/arch/arm/plat-s3c24xx/pm.c @@ -612,9 +612,9 @@ static int s3c2410_pm_enter(suspend_state_t state) return 0; } -static struct pm_ops s3c2410_pm_ops = { +static struct platform_suspend_ops s3c2410_pm_ops = { .enter = s3c2410_pm_enter, - .valid = pm_valid_only_mem, + .valid = suspend_valid_only_mem, }; /* s3c2410_pm_init @@ -628,6 +628,6 @@ int __init s3c2410_pm_init(void) { printk("S3C2410 Power Management, (c) 2004 Simtec Electronics\n"); - pm_set_ops(&s3c2410_pm_ops); + suspend_set_ops(&s3c2410_pm_ops); return 0; } |