提交 031ec77b 编写于 作者: K Karol Kozimor 提交者: Len Brown

[ACPI] acpi_remove_notify_handler() on video driver unload

The video driver doesn't properly remove all the notify handlers
on module unload.  This has a side effect of subdevices failing
to register on module reload, but sudden death looms if the
handlers trigger after the module is unloaded.
Signed-off-by: NKarol Kozimor <sziwan@hell.org.pl>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 e92310a9
...@@ -1665,6 +1665,7 @@ static int ...@@ -1665,6 +1665,7 @@ static int
acpi_video_bus_put_one_device( acpi_video_bus_put_one_device(
struct acpi_video_device *device) struct acpi_video_device *device)
{ {
acpi_status status;
struct acpi_video_bus *video; struct acpi_video_bus *video;
ACPI_FUNCTION_TRACE("acpi_video_bus_put_one_device"); ACPI_FUNCTION_TRACE("acpi_video_bus_put_one_device");
...@@ -1679,6 +1680,12 @@ acpi_video_bus_put_one_device( ...@@ -1679,6 +1680,12 @@ acpi_video_bus_put_one_device(
up(&video->sem); up(&video->sem);
acpi_video_device_remove_fs(device->dev); acpi_video_device_remove_fs(device->dev);
status = acpi_remove_notify_handler(device->handle,
ACPI_DEVICE_NOTIFY, acpi_video_device_notify);
if (ACPI_FAILURE(status))
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Error removing notify handler\n"));
return_VALUE(0); return_VALUE(0);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册