Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Feb 2016 22:50:45 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r295938 - head/sys/dev/acpica
Message-ID:  <201602232250.u1NMojE1064295@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602232250.u1NMojE1064295>