Skip to content

Commit ac698c4

Browse files
rafaeljwgregkh
authored andcommitted
platform/chrome: chromeos_tbmc: Drop wakeup source on remove
[ Upstream commit 5d441a4 ] 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: 0144c00 ("platform/chrome: chromeos_tbmc: Report wake events") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/6151957.MhkbZ0Pkbq@rafael.j.wysocki Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent bd5a2c1 commit ac698c4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/platform/chrome/chromeos_tbmc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ static int chromeos_tbmc_add(struct acpi_device *adev)
9595
return 0;
9696
}
9797

98+
static void chromeos_tbmc_remove(struct acpi_device *adev)
99+
{
100+
device_init_wakeup(&adev->dev, false);
101+
}
102+
98103
static const struct acpi_device_id chromeos_tbmc_acpi_device_ids[] = {
99104
{ ACPI_DRV_NAME, 0 },
100105
{ }
@@ -110,6 +115,7 @@ static struct acpi_driver chromeos_tbmc_driver = {
110115
.ids = chromeos_tbmc_acpi_device_ids,
111116
.ops = {
112117
.add = chromeos_tbmc_add,
118+
.remove = chromeos_tbmc_remove,
113119
.notify = chromeos_tbmc_notify,
114120
},
115121
.drv.pm = &chromeos_tbmc_pm_ops,

0 commit comments

Comments
 (0)