summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/powermac
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2013-08-31 16:31:48 +0000
committerjhibbits <jhibbits@FreeBSD.org>2013-08-31 16:31:48 +0000
commitdb710e1091a0273897c76d19c2e204f984fcacdf (patch)
treefaea260255965f1cd16047d53aea6b386bc72d4a /sys/powerpc/powermac
parent73fbcbce2a925ecd0e5cfb711122bdae02883682 (diff)
downloadFreeBSD-src-db710e1091a0273897c76d19c2e204f984fcacdf.zip
FreeBSD-src-db710e1091a0273897c76d19c2e204f984fcacdf.tar.gz
Only add the backlight device if it actually exists in OF.
MFC after: 1 week
Diffstat (limited to 'sys/powerpc/powermac')
-rw-r--r--sys/powerpc/powermac/atibl.c2
-rw-r--r--sys/powerpc/powermac/nvbl.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/powerpc/powermac/atibl.c b/sys/powerpc/powermac/atibl.c
index fff76d0..f4ac9b0 100644
--- a/sys/powerpc/powermac/atibl.c
+++ b/sys/powerpc/powermac/atibl.c
@@ -86,6 +86,8 @@ DRIVER_MODULE(atibl, vgapci, atibl_driver, atibl_devclass, 0, 0);
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);
}
diff --git a/sys/powerpc/powermac/nvbl.c b/sys/powerpc/powermac/nvbl.c
index 1f89881..033f972 100644
--- a/sys/powerpc/powermac/nvbl.c
+++ b/sys/powerpc/powermac/nvbl.c
@@ -82,6 +82,8 @@ DRIVER_MODULE(nvbl, vgapci, nvbl_driver, nvbl_devclass, 0, 0);
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);
}
OpenPOWER on IntegriCloud