acpi: video.c: properly remove notify handlers
PATCH 4/7 acpi: video.c: properly remove notify handlers
From: Karol Kozimor <sziwan-DETuoxkZsSqrDJvtcaxF/[email protected]>
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 (not that I've seen such a machine, but still).
Signed-off-by Andrew Morton <[email protected]>
---
drivers/acpi/video.c | 7 +++++++ 1 files changed, 7 insertions(+)
drivers/acpi/video.c renamed from drivers/acpi/video.c~acpi-videoc-properly-remove-notify-handlers +7 -0
@@ -1665,6 +1665,7 @@ static intacpi_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 ); }
_
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click