Date: Sat, 31 Aug 2013 16:31:48 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255100 - head/sys/powerpc/powermac Message-ID: <201308311631.r7VGVmXk084908@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308311631.r7VGVmXk084908>