The core is responsibile for clearing device->driverdata on removal. Signed-off-by: Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx> --- 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(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 64a20ef..add6621 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -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); diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c index d933980..8d89337 100644 --- a/drivers/acpi/sbshc.c +++ b/drivers/acpi/sbshc.c @@ -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; } diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index b51f1fe..f405807 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -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; } diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c index fe4fa29..7fc7625 100644 --- a/drivers/hwmon/asus_atk0110.c +++ b/drivers/hwmon/asus_atk0110.c @@ -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); -- 1.6.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html