diff options
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 8851315ce858..60ea984c84a0 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -2004,8 +2004,11 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device) | |||
2004 | status = acpi_remove_notify_handler(device->dev->handle, | 2004 | status = acpi_remove_notify_handler(device->dev->handle, |
2005 | ACPI_DEVICE_NOTIFY, | 2005 | ACPI_DEVICE_NOTIFY, |
2006 | acpi_video_device_notify); | 2006 | acpi_video_device_notify); |
2007 | sysfs_remove_link(&device->backlight->dev.kobj, "device"); | 2007 | if (device->backlight) { |
2008 | backlight_device_unregister(device->backlight); | 2008 | sysfs_remove_link(&device->backlight->dev.kobj, "device"); |
2009 | backlight_device_unregister(device->backlight); | ||
2010 | device->backlight = NULL; | ||
2011 | } | ||
2009 | if (device->cdev) { | 2012 | if (device->cdev) { |
2010 | sysfs_remove_link(&device->dev->dev.kobj, | 2013 | sysfs_remove_link(&device->dev->dev.kobj, |
2011 | "thermal_cooling"); | 2014 | "thermal_cooling"); |