From: Karol Kozimor <sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] video.c: properly remove notify handlers
Date: Wed, 29 Jun 2005 19:03:52 +0200 [thread overview]
Message-ID: <20050629170352.GA11807@hell.org.pl> (raw)
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-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org
Signed-off-by: Karol Kozimor <sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
--- 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);
}
-------------------------------------------------------
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
WARNING: multiple messages have this Message-ID (diff)
From: Karol Kozimor <sziwan@hell.org.pl>
To: acpi-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] video.c: properly remove notify handlers
Date: Wed, 29 Jun 2005 19:03:52 +0200 [thread overview]
Message-ID: <20050629170352.GA11807@hell.org.pl> (raw)
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);
}
next reply other threads:[~2005-06-29 17:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-29 17:03 Karol Kozimor [this message]
2005-06-29 17:03 ` [PATCH] video.c: properly remove notify handlers Karol Kozimor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050629170352.GA11807@hell.org.pl \
--to=sziwan-detuoxkzssqrdjvtcaxf/a@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.