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

Commit b9b8515f authored by Aaron Lu's avatar Aaron Lu Committed by Rafael J. Wysocki
Browse files

ACPI / fan: do nothing in suspend and poweroff callback

We put fans to full speed in acpi_fan_suspend(), but that is only
needed in the hibernation case when we are generating hibernation
image, so this patch removes that when we are about to suspend or
poweroff.

References: http://www.spinics.net/lists/linux-acpi/msg48636.html


Signed-off-by: default avatarAaron Lu <aaron.lu@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 5e2e46e8
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -55,11 +55,16 @@ MODULE_DEVICE_TABLE(acpi, fan_device_ids);
#ifdef CONFIG_PM_SLEEP
static int acpi_fan_suspend(struct device *dev);
static int acpi_fan_resume(struct device *dev);
static struct dev_pm_ops acpi_fan_pm = {
	.resume = acpi_fan_resume,
	.freeze = acpi_fan_suspend,
	.thaw = acpi_fan_resume,
	.restore = acpi_fan_resume,
};
#define FAN_PM_OPS_PTR (&acpi_fan_pm)
#else
#define acpi_fan_suspend NULL
#define acpi_fan_resume NULL
#define FAN_PM_OPS_PTR NULL
#endif
static SIMPLE_DEV_PM_OPS(acpi_fan_pm, acpi_fan_suspend, acpi_fan_resume);

static struct acpi_driver acpi_fan_driver = {
	.name = "fan",
@@ -69,7 +74,7 @@ static struct acpi_driver acpi_fan_driver = {
		.add = acpi_fan_add,
		.remove = acpi_fan_remove,
		},
	.drv.pm = &acpi_fan_pm,
	.drv.pm = FAN_PM_OPS_PTR,
};

/* thermal cooling device callbacks */