Skip to content

Commit 85d0bd1

Browse files
committed
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 <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/6242843.lOV4Wx5bFT@rafael.j.wysocki
1 parent 2995e71 commit 85d0bd1

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

drivers/acpi/ec.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,12 +1754,10 @@ static int acpi_ec_probe(struct platform_device *pdev)
17541754

17551755
static void acpi_ec_remove(struct platform_device *pdev)
17561756
{
1757-
struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
17581757
struct acpi_ec *ec = platform_get_drvdata(pdev);
17591758

17601759
release_region(ec->data_addr, 1);
17611760
release_region(ec->command_addr, 1);
1762-
device->driver_data = NULL;
17631761
if (ec != boot_ec) {
17641762
ec_remove_handlers(ec);
17651763
acpi_ec_free(ec);

drivers/acpi/sbshc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,11 @@ static int acpi_smbus_hc_probe(struct platform_device *pdev)
275275

276276
static void acpi_smbus_hc_remove(struct platform_device *pdev)
277277
{
278-
struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
279278
struct acpi_smb_hc *hc = platform_get_drvdata(pdev);
280279

281280
acpi_ec_remove_query_handler(hc->ec, hc->query_bit);
282281
acpi_os_wait_events_complete();
283282
kfree(hc);
284-
device->driver_data = NULL;
285283
}
286284

287285
module_platform_driver(acpi_smb_hc_driver);

0 commit comments

Comments
 (0)