From: Rafael J. Wysocki Date: Fri, 13 Feb 2026 18:26:48 +0000 (+0100) Subject: ACPI: driver: Drop driver_data pointer clearing from two drivers X-Git-Tag: v7.0-rc1~50^2^4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85d0bd1d4cccd8e91e11de2d5dddf9691d780468;p=thirdparty%2Fkernel%2Fstable.git ACPI: driver: Drop driver_data pointer clearing from two drivers It is not necessary to clear the driver_data pointer in the ACPI companion device object on driver remove in the EC and SMBUS HC ACPI drivers because that pointer is not used there any more after recent changes. Drop the unnecessary statements. Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/6242843.lOV4Wx5bFT@rafael.j.wysocki --- diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 197970339edc9..f7edc664e064c 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1754,12 +1754,10 @@ err: static void acpi_ec_remove(struct platform_device *pdev) { - struct acpi_device *device = ACPI_COMPANION(&pdev->dev); struct acpi_ec *ec = platform_get_drvdata(pdev); release_region(ec->data_addr, 1); release_region(ec->command_addr, 1); - device->driver_data = NULL; if (ec != boot_ec) { ec_remove_handlers(ec); acpi_ec_free(ec); diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c index 7fc8ae7396d33..cb60d1d52e3e2 100644 --- a/drivers/acpi/sbshc.c +++ b/drivers/acpi/sbshc.c @@ -275,13 +275,11 @@ static int acpi_smbus_hc_probe(struct platform_device *pdev) static void acpi_smbus_hc_remove(struct platform_device *pdev) { - struct acpi_device *device = ACPI_COMPANION(&pdev->dev); struct acpi_smb_hc *hc = platform_get_drvdata(pdev); acpi_ec_remove_query_handler(hc->ec, hc->query_bit); acpi_os_wait_events_complete(); kfree(hc); - device->driver_data = NULL; } module_platform_driver(acpi_smb_hc_driver);