Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71101
b: refs/heads/master
c: 26398a7
h: refs/heads/master
i:
  71099: c49aa02
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Linus Torvalds committed Oct 18, 2007
1 parent a3a81b0 commit d2ca74e
Show file tree
Hide file tree
Showing 17 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95d9ffbe01fb21d524c86bf77871255066bc6e55
refs/heads/master: 26398a70ea35f153feb799fa850c71685667712b
2 changes: 1 addition & 1 deletion trunk/Documentation/power/interface.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ states.
/sys/power/disk controls the operating mode of the suspend-to-disk
mechanism. Suspend-to-disk can be handled in several ways. We have a
few options for putting the system to sleep - using the platform driver
(e.g. ACPI or other pm_ops), powering off the system or rebooting the
(e.g. ACPI or other suspend_ops), powering off the system or rebooting the
system (for testing).

Additionally, /sys/power/disk can be used to turn on one of the two testing
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/arm/common/sharpsl_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,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)
Expand Down Expand Up @@ -800,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));

Expand All @@ -809,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);
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-at91/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ static int at91_pm_enter(suspend_state_t state)
}


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,
Expand All @@ -219,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;
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/mach-omap1/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,11 +673,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)
Expand Down Expand Up @@ -734,7 +734,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();
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/mach-omap2/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,11 @@ static int omap2_pm_finish(suspend_state_t state)
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)
Expand All @@ -390,7 +390,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();
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-pnx4008/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-pxa/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand All @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-pxa/pxa25x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/mach-sa1100/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/plat-s3c24xx/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
4 changes: 2 additions & 2 deletions trunk/arch/blackfin/mach-common/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static int bfin_pm_valid(suspend_state_t state)
return (state == PM_SUSPEND_STANDBY);
}

struct pm_ops bfin_pm_ops = {
struct platform_suspend_ops bfin_pm_ops = {
.prepare = bfin_pm_prepare,
.enter = bfin_pm_enter,
.finish = bfin_pm_finish,
Expand All @@ -172,7 +172,7 @@ struct pm_ops bfin_pm_ops = {

static int __init bfin_pm_init(void)
{
pm_set_ops(&bfin_pm_ops);
suspend_set_ops(&bfin_pm_ops);
return 0;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/platforms/52xx/mpc52xx_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ int mpc52xx_pm_finish(suspend_state_t state)
return 0;
}

static struct pm_ops mpc52xx_pm_ops = {
static struct platform_suspend_ops mpc52xx_pm_ops = {
.valid = mpc52xx_pm_valid,
.prepare = mpc52xx_pm_prepare,
.enter = mpc52xx_pm_enter,
Expand All @@ -186,6 +186,6 @@ static struct pm_ops mpc52xx_pm_ops = {

int __init mpc52xx_pm_init(void)
{
pm_set_ops(&mpc52xx_pm_ops);
suspend_set_ops(&mpc52xx_pm_ops);
return 0;
}
6 changes: 3 additions & 3 deletions trunk/arch/sh/boards/hp6xx/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ static int hp6x0_pm_enter(suspend_state_t state)
return 0;
}

static struct pm_ops hp6x0_pm_ops = {
static struct platform_suspend_ops hp6x0_pm_ops = {
.enter = hp6x0_pm_enter,
.valid = pm_valid_only_mem,
.valid = suspend_valid_only_mem,
};

static int __init hp6x0_pm_init(void)
{
pm_set_ops(&hp6x0_pm_ops);
suspend_set_ops(&hp6x0_pm_ops);
return 0;
}

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/acpi/sleep/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int acpi_sleep_prepare(u32 acpi_state)
}

#ifdef CONFIG_SUSPEND
static struct pm_ops acpi_pm_ops;
static struct platform_suspend_ops acpi_pm_ops;

extern void do_suspend_lowlevel(void);

Expand Down Expand Up @@ -203,7 +203,7 @@ static int acpi_pm_state_valid(suspend_state_t pm_state)
}
}

static struct pm_ops acpi_pm_ops = {
static struct platform_suspend_ops acpi_pm_ops = {
.valid = acpi_pm_state_valid,
.set_target = acpi_pm_set_target,
.prepare = acpi_pm_prepare,
Expand Down Expand Up @@ -417,7 +417,7 @@ int __init acpi_sleep_init(void)
}
}

pm_set_ops(&acpi_pm_ops);
suspend_set_ops(&acpi_pm_ops);
#endif

#ifdef CONFIG_HIBERNATION
Expand Down
22 changes: 11 additions & 11 deletions trunk/include/linux/suspend.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ typedef int __bitwise suspend_state_t;
#define PM_SUSPEND_MAX ((__force suspend_state_t) 4)

/**
* struct pm_ops - Callbacks for managing platform dependent system sleep
* states.
* struct platform_suspend_ops - Callbacks for managing platform dependent
* system sleep states.
*
* @valid: Callback to determine if given system sleep state is supported by
* the platform.
* Valid (ie. supported) states are advertised in /sys/power/state. Note
* that it still may be impossible to enter given system sleep state if the
* conditions aren't right.
* There is the %pm_valid_only_mem function available that can be assigned
* to this if the platform only supports mem sleep.
* There is the %suspend_valid_only_mem function available that can be
* assigned to this if the platform only supports mem sleep.
*
* @set_target: Tell the platform which system sleep state is going to be
* entered.
Expand Down Expand Up @@ -73,7 +73,7 @@ typedef int __bitwise suspend_state_t;
* that implement @prepare(). If implemented, it is always called after
* @enter() (even if @enter() fails).
*/
struct pm_ops {
struct platform_suspend_ops {
int (*valid)(suspend_state_t state);
int (*set_target)(suspend_state_t state);
int (*prepare)(suspend_state_t state);
Expand All @@ -82,14 +82,14 @@ struct pm_ops {
};

#ifdef CONFIG_SUSPEND
extern struct pm_ops *pm_ops;
extern struct platform_suspend_ops *suspend_ops;

/**
* pm_set_ops - set platform dependent power management ops
* @pm_ops: The new power management operations to set.
* suspend_set_ops - set platform dependent suspend operations
* @ops: The new suspend operations to set.
*/
extern void pm_set_ops(struct pm_ops *pm_ops);
extern int pm_valid_only_mem(suspend_state_t state);
extern void suspend_set_ops(struct platform_suspend_ops *ops);
extern int suspend_valid_only_mem(suspend_state_t state);

/**
* arch_suspend_disable_irqs - disable IRQs for suspend
Expand All @@ -113,7 +113,7 @@ extern int pm_suspend(suspend_state_t state);
#else /* !CONFIG_SUSPEND */
#define suspend_valid_only_mem NULL

static inline void pm_set_ops(struct pm_ops *pm_ops) {}
static inline void suspend_set_ops(struct platform_suspend_ops *ops) {}
static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; }
#endif /* !CONFIG_SUSPEND */

Expand Down
Loading

0 comments on commit d2ca74e

Please sign in to comment.