diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2003-10-22 20:56:11 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2003-10-22 20:56:11 +0000 |
commit | aab573d1cdc97d9e28301a8af662a260626ec09d (patch) | |
tree | 5366e7d09b2e8b1e645e9cb88bf12f87561a82aa /sys | |
parent | 2ef0fcd8b962bcffb32d86279babe95b43af440c (diff) |
Search for the '/backlight' node to determine if backlight control is
available instead of looking for the backlight-control attribute.
Fixes backlight control on some apple laptops.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/macppc/macppc/ofw_machdep.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/arch/macppc/macppc/ofw_machdep.c b/sys/arch/macppc/macppc/ofw_machdep.c index 3cdf5a2eadf..0e28996f634 100644 --- a/sys/arch/macppc/macppc/ofw_machdep.c +++ b/sys/arch/macppc/macppc/ofw_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofw_machdep.c,v 1.21 2003/10/16 05:03:22 deraadt Exp $ */ +/* $OpenBSD: ofw_machdep.c,v 1.22 2003/10/22 20:56:10 drahn Exp $ */ /* $NetBSD: ofw_machdep.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -493,7 +493,6 @@ of_display_console() int stdout_node; int display_node; int err; - int backlight_control[2]; u_int32_t memtag, iotag; struct ppc_pci_chipset pa; struct { @@ -546,9 +545,8 @@ of_display_console() panic(": no address"); } } - len = OF_getprop(stdout_node, "backlight-control", - backlight_control, sizeof(backlight_control)); - if (len > 0) + + if (OF_finddevice("/backlight") != NULL) cons_backlight_available = 1; memtag = ofw_make_tag(NULL, pcibus(addr[0].phys_hi), |