diff options
author | Karol Kozimor <sziwan@hell.org.pl> | 2005-07-30 04:18:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-08-04 22:32:51 -0400 |
commit | 031ec77bf67e4bda994ef8ceba267be3295ffdb7 (patch) | |
tree | b2f8ec4abbc511568e1d147ebaa99967e180edfb /drivers/acpi/video.c | |
parent | e92310a930462c6e1611f35453f57357c42bde14 (diff) |
[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: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 2cf264fd52e0..7b10a7b070c9 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -1665,6 +1665,7 @@ static int acpi_video_bus_put_one_device( struct acpi_video_device *device) { + acpi_status status; struct acpi_video_bus *video; ACPI_FUNCTION_TRACE("acpi_video_bus_put_one_device"); @@ -1679,6 +1680,12 @@ acpi_video_bus_put_one_device( up(&video->sem); 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); } |