Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26398a70 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Linus Torvalds
Browse files

PM: Rename struct pm_ops and related things



The name of 'struct pm_ops' suggests that it is related to the power
management in general, but in fact it is only related to suspend.   Moreover,
its name should indicate what this structure is used for, so it seems
reasonable to change it to 'struct platform_suspend_ops'.   In that case, the
name of the global variable of this type used by the PM core and the names of
related functions should be changed accordingly.

Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 95d9ffbe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+4 −4
Original line number Diff line number Diff line
@@ -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)
@@ -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));

@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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,
@@ -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;
}
+3 −3
Original line number Diff line number Diff line
@@ -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)
@@ -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();
+3 −3
Original line number Diff line number Diff line
@@ -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)
@@ -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();
Loading