Author: jkim
Date: Tue Feb 23 22:50:45 2016
New Revision: 295938
URL: https://svnweb.freebsd.org/changeset/base/295938

Log:
  Remove brightness notify handler before reinstalling new one.

Modified:
  head/sys/dev/acpica/acpi_video.c

Modified: head/sys/dev/acpica/acpi_video.c
==============================================================================
--- head/sys/dev/acpica/acpi_video.c    Tue Feb 23 22:44:01 2016        
(r295937)
+++ head/sys/dev/acpica/acpi_video.c    Tue Feb 23 22:50:45 2016        
(r295938)
@@ -597,8 +597,12 @@ acpi_video_vo_bind(struct acpi_video_out
 {
 
        ACPI_SERIAL_BEGIN(video_output);
-       if (vo->vo_levels != NULL)
+       if (vo->vo_levels != NULL) {
+               AcpiRemoveNotifyHandler(vo->handle, ACPI_DEVICE_NOTIFY,
+                   acpi_video_vo_notify_handler);
                AcpiOsFree(vo->vo_levels);
+               vo->vo_levels = NULL;
+       }
        vo->handle = handle;
        vo->vo_numlevels = vo_get_brightness_levels(handle, &vo->vo_levels);
        if (vo->vo_numlevels >= 2) {
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to