svn commit: r255100 - head/sys/powerpc/powermac

Justin Hibbits jhibbits at FreeBSD.org
Sat Aug 31 16:31:49 UTC 2013


Author: jhibbits
Date: Sat Aug 31 16:31:48 2013
New Revision: 255100
URL: http://svnweb.freebsd.org/changeset/base/255100

Log:
  Only add the backlight device if it actually exists in OF.
  
  MFC after:	1 week

Modified:
  head/sys/powerpc/powermac/atibl.c
  head/sys/powerpc/powermac/nvbl.c

Modified: head/sys/powerpc/powermac/atibl.c
==============================================================================
--- head/sys/powerpc/powermac/atibl.c	Sat Aug 31 16:30:20 2013	(r255099)
+++ head/sys/powerpc/powermac/atibl.c	Sat Aug 31 16:31:48 2013	(r255100)
@@ -86,6 +86,8 @@ DRIVER_MODULE(atibl, vgapci, atibl_drive
 static void
 atibl_identify(driver_t *driver, device_t parent)
 {
+	if (OF_finddevice("mac-io/backlight") == -1)
+		return;
 	if (device_find_child(parent, "backlight", -1) == NULL)
 		device_add_child(parent, "backlight", -1);
 }

Modified: head/sys/powerpc/powermac/nvbl.c
==============================================================================
--- head/sys/powerpc/powermac/nvbl.c	Sat Aug 31 16:30:20 2013	(r255099)
+++ head/sys/powerpc/powermac/nvbl.c	Sat Aug 31 16:31:48 2013	(r255100)
@@ -82,6 +82,8 @@ DRIVER_MODULE(nvbl, vgapci, nvbl_driver,
 static void
 nvbl_identify(driver_t *driver, device_t parent)
 {
+	if (OF_finddevice("mac-io/backlight") == -1)
+		return;
 	if (device_find_child(parent, "backlight", -1) == NULL)
 		device_add_child(parent, "backlight", -1);
 }


More information about the svn-src-all mailing list