diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpica/exstorob.c | 12 | ||||
-rw-r--r-- | drivers/acpi/blacklist.c | 5 | ||||
-rw-r--r-- | drivers/acpi/video.c | 7 |
3 files changed, 20 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/exstorob.c b/drivers/acpi/acpica/exstorob.c index 67340cc7014..257706e7734 100644 --- a/drivers/acpi/acpica/exstorob.c +++ b/drivers/acpi/acpica/exstorob.c | |||
@@ -70,6 +70,12 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc, | |||
70 | 70 | ||
71 | ACPI_FUNCTION_TRACE_PTR(ex_store_buffer_to_buffer, source_desc); | 71 | ACPI_FUNCTION_TRACE_PTR(ex_store_buffer_to_buffer, source_desc); |
72 | 72 | ||
73 | /* If Source and Target are the same, just return */ | ||
74 | |||
75 | if (source_desc == target_desc) { | ||
76 | return_ACPI_STATUS(AE_OK); | ||
77 | } | ||
78 | |||
73 | /* We know that source_desc is a buffer by now */ | 79 | /* We know that source_desc is a buffer by now */ |
74 | 80 | ||
75 | buffer = ACPI_CAST_PTR(u8, source_desc->buffer.pointer); | 81 | buffer = ACPI_CAST_PTR(u8, source_desc->buffer.pointer); |
@@ -161,6 +167,12 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc, | |||
161 | 167 | ||
162 | ACPI_FUNCTION_TRACE_PTR(ex_store_string_to_string, source_desc); | 168 | ACPI_FUNCTION_TRACE_PTR(ex_store_string_to_string, source_desc); |
163 | 169 | ||
170 | /* If Source and Target are the same, just return */ | ||
171 | |||
172 | if (source_desc == target_desc) { | ||
173 | return_ACPI_STATUS(AE_OK); | ||
174 | } | ||
175 | |||
164 | /* We know that source_desc is a string by now */ | 176 | /* We know that source_desc is a string by now */ |
165 | 177 | ||
166 | buffer = ACPI_CAST_PTR(u8, source_desc->string.pointer); | 178 | buffer = ACPI_CAST_PTR(u8, source_desc->string.pointer); |
diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index f6baa77deef..0c4ca4d318b 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c | |||
@@ -78,9 +78,10 @@ static struct acpi_blacklist_item acpi_blacklist[] __initdata = { | |||
78 | 78 | ||
79 | static int __init blacklist_by_year(void) | 79 | static int __init blacklist_by_year(void) |
80 | { | 80 | { |
81 | int year = dmi_get_year(DMI_BIOS_DATE); | 81 | int year; |
82 | |||
82 | /* Doesn't exist? Likely an old system */ | 83 | /* Doesn't exist? Likely an old system */ |
83 | if (year == -1) { | 84 | if (!dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL)) { |
84 | printk(KERN_ERR PREFIX "no DMI BIOS year, " | 85 | printk(KERN_ERR PREFIX "no DMI BIOS year, " |
85 | "acpi=force is required to enable ACPI\n" ); | 86 | "acpi=force is required to enable ACPI\n" ); |
86 | return 1; | 87 | return 1; |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 8851315ce85..60ea984c84a 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"); |