public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] video.c: properly remove notify handlers
@ 2005-06-29 17:03 Karol Kozimor
  0 siblings, 0 replies; only message in thread
From: Karol Kozimor @ 2005-06-29 17:03 UTC (permalink / raw)
  To: acpi-devel; +Cc: linux-kernel

Hi,
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). Please apply.
Best regards,

-- 
Karol 'sziwan' Kozimor
sziwan@hell.org.pl

Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>

--- a/drivers/acpi/video.c	2005-04-26 00:43:38.000000000 +0200
+++ b/drivers/acpi/video.c	2005-06-29 18:02:04.000000000 +0200
@@ -1666,6 +1666,7 @@
 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");
@@ -1680,6 +1681,12 @@
 	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);
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-29 17:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-29 17:03 [PATCH] video.c: properly remove notify handlers Karol Kozimor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox