@@ -852,7 +852,6 @@ static int acpi_ec_remove(struct acpi_device *device, int type)
}
mutex_unlock(&ec->lock);
acpi_ec_remove_fs(device);
- device->driver_data = NULL;
if (ec == first_ec)
first_ec = NULL;
kfree(ec);
@@ -304,7 +304,6 @@ static int acpi_smbus_hc_remove(struct acpi_device *device, int type)
hc = acpi_driver_data(device);
acpi_ec_remove_query_handler(hc->ec, hc->query_bit);
kfree(hc);
- device->driver_data = NULL;
return 0;
}
@@ -2345,7 +2345,6 @@ static int acpi_video_bus_add(struct acpi_device *device)
acpi_video_bus_remove_fs(device);
err_free_video:
kfree(video);
- device->driver_data = NULL;
return error;
}
@@ -982,8 +982,6 @@ static int atk_remove(struct acpi_device *device, int type)
struct atk_data *data = device->driver_data;
dev_dbg(&device->dev, "removing...\n");
- device->driver_data = NULL;
-
atk_remove_files(data);
atk_free_sensors(data);
hwmon_device_unregister(data->hwmon_dev);
The core is responsibile for clearing device->driverdata on removal. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> --- drivers/acpi/ec.c | 1 - drivers/acpi/sbshc.c | 1 - drivers/acpi/video.c | 1 - drivers/hwmon/asus_atk0110.c | 2 -- 4 files changed, 0 insertions(+), 5 deletions(-)