Commit 5d441a4b authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Tzung-Bi Shih
Browse files

platform/chrome: chromeos_tbmc: Drop wakeup source on remove



The wakeup source added by device_init_wakeup() in chromeos_tbmc_add()
needs to be dropped during driver removal, so add a .remove() callback
to the driver for this purpose.

Fixes: 0144c00e ("platform/chrome: chromeos_tbmc: Report wake events")
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/6151957.MhkbZ0Pkbq@rafael.j.wysocki


Signed-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
parent d3c2872a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -95,6 +95,11 @@ static int chromeos_tbmc_add(struct acpi_device *adev)
	return 0;
}

static void chromeos_tbmc_remove(struct acpi_device *adev)
{
	device_init_wakeup(&adev->dev, false);
}

static const struct acpi_device_id chromeos_tbmc_acpi_device_ids[] = {
	{ ACPI_DRV_NAME, 0 },
	{ }
@@ -110,6 +115,7 @@ static struct acpi_driver chromeos_tbmc_driver = {
	.ids = chromeos_tbmc_acpi_device_ids,
	.ops = {
		.add = chromeos_tbmc_add,
		.remove = chromeos_tbmc_remove,
		.notify = chromeos_tbmc_notify,
	},
	.drv.pm = &chromeos_tbmc_pm_ops,