diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-03-05 22:47:03 +0300 |
|---|---|---|
| committer | Tzung-Bi Shih <tzungbi@kernel.org> | 2026-03-06 07:35:07 +0300 |
| commit | 5d441a4bc93642ed6f41da87327a39946b4e1455 (patch) | |
| tree | 7b112d92a7e9e062749599f44ac6c5f5ef326912 | |
| parent | d3c2872ae323ea45cc32ea0247f26c2189a481cb (diff) | |
| download | linux-5d441a4bc93642ed6f41da87327a39946b4e1455.tar.xz | |
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: 0144c00ed86b ("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>
| -rw-r--r-- | drivers/platform/chrome/chromeos_tbmc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/platform/chrome/chromeos_tbmc.c b/drivers/platform/chrome/chromeos_tbmc.c index d1cf8f3463ce..e248567c0a18 100644 --- a/drivers/platform/chrome/chromeos_tbmc.c +++ b/drivers/platform/chrome/chromeos_tbmc.c @@ -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, |
