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

Commit 6ed23b80 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

PM: Merge the SET*_RUNTIME_PM_OPS() macros



The SET_PM_RUNTIME_PM_OPS() and SET_RUNTIME_PM_OPS() macros are
identical except that one of them is not empty for CONFIG_PM set,
while the other one is not empty for CONFIG_PM_RUNTIME set,
respectively.

However, after commit b2b49ccb (PM: Kconfig: Set PM_RUNTIME if
PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so one
of these macros is now redundant.

For this reason, replace SET_PM_RUNTIME_PM_OPS() with
SET_RUNTIME_PM_OPS() everywhere and redefine the SET_PM_RUNTIME_PM_OPS
symbol as SET_RUNTIME_PM_OPS in case new code is starting to use the
macro being removed here.

Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Acked-by: default avatarKevin Hilman <khilman@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent a1518d3b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -124,7 +124,7 @@ static const struct dev_pm_ops amba_pm = {
	.thaw		= pm_generic_thaw,
	.thaw		= pm_generic_thaw,
	.poweroff	= pm_generic_poweroff,
	.poweroff	= pm_generic_poweroff,
	.restore	= pm_generic_restore,
	.restore	= pm_generic_restore,
	SET_PM_RUNTIME_PM_OPS(
	SET_RUNTIME_PM_OPS(
		amba_pm_runtime_suspend,
		amba_pm_runtime_suspend,
		amba_pm_runtime_resume,
		amba_pm_runtime_resume,
		NULL
		NULL
+1 −1
Original line number Original line Diff line number Diff line
@@ -3051,7 +3051,7 @@ static int dma40_runtime_resume(struct device *dev)


static const struct dev_pm_ops dma40_pm_ops = {
static const struct dev_pm_ops dma40_pm_ops = {
	SET_LATE_SYSTEM_SLEEP_PM_OPS(dma40_suspend, dma40_resume)
	SET_LATE_SYSTEM_SLEEP_PM_OPS(dma40_suspend, dma40_resume)
	SET_PM_RUNTIME_PM_OPS(dma40_runtime_suspend,
	SET_RUNTIME_PM_OPS(dma40_runtime_suspend,
				dma40_runtime_resume,
				dma40_runtime_resume,
				NULL)
				NULL)
};
};
+1 −1
Original line number Original line Diff line number Diff line
@@ -578,7 +578,7 @@ static void zynq_gpio_free(struct gpio_chip *chip, unsigned offset)


static const struct dev_pm_ops zynq_gpio_dev_pm_ops = {
static const struct dev_pm_ops zynq_gpio_dev_pm_ops = {
	SET_SYSTEM_SLEEP_PM_OPS(zynq_gpio_suspend, zynq_gpio_resume)
	SET_SYSTEM_SLEEP_PM_OPS(zynq_gpio_suspend, zynq_gpio_resume)
	SET_PM_RUNTIME_PM_OPS(zynq_gpio_runtime_suspend,
	SET_RUNTIME_PM_OPS(zynq_gpio_runtime_suspend,
			zynq_gpio_runtime_resume, NULL)
			zynq_gpio_runtime_resume, NULL)
};
};


+1 −1
Original line number Original line Diff line number Diff line
@@ -528,7 +528,7 @@ static int hix5hd2_i2c_runtime_resume(struct device *dev)
#endif
#endif


static const struct dev_pm_ops hix5hd2_i2c_pm_ops = {
static const struct dev_pm_ops hix5hd2_i2c_pm_ops = {
	SET_PM_RUNTIME_PM_OPS(hix5hd2_i2c_runtime_suspend,
	SET_RUNTIME_PM_OPS(hix5hd2_i2c_runtime_suspend,
			      hix5hd2_i2c_runtime_resume,
			      hix5hd2_i2c_runtime_resume,
			      NULL)
			      NULL)
};
};
+1 −1
Original line number Original line Diff line number Diff line
@@ -932,7 +932,7 @@ static int nmk_i2c_runtime_resume(struct device *dev)


static const struct dev_pm_ops nmk_i2c_pm = {
static const struct dev_pm_ops nmk_i2c_pm = {
	SET_LATE_SYSTEM_SLEEP_PM_OPS(nmk_i2c_suspend_late, nmk_i2c_resume_early)
	SET_LATE_SYSTEM_SLEEP_PM_OPS(nmk_i2c_suspend_late, nmk_i2c_resume_early)
	SET_PM_RUNTIME_PM_OPS(nmk_i2c_runtime_suspend,
	SET_RUNTIME_PM_OPS(nmk_i2c_runtime_suspend,
			nmk_i2c_runtime_resume,
			nmk_i2c_runtime_resume,
			NULL)
			NULL)
};
};
Loading