summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorPaul Irofti <pirofti@cvs.openbsd.org>2009-06-04 04:50:09 +0000
committerPaul Irofti <pirofti@cvs.openbsd.org>2009-06-04 04:50:09 +0000
commitd0d5b90a88b7f1a939abcc689034e0ac2e0d1c96 (patch)
tree83323cbc234625b34572acdff9baba52363bcde5 /sys/dev
parent7ee45ff0cc9dfda370bf6ac721453b0dc17f8efc (diff)
Some output devices have only brightness support (or only output switching).
Handle the case where only brightness is supported. This makes brightness work on some Sony Vaio's. Okay mlarkin@ deraadt@.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpivideo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/acpi/acpivideo.c b/sys/dev/acpi/acpivideo.c
index a1728a08737..a23430cc946 100644
--- a/sys/dev/acpi/acpivideo.c
+++ b/sys/dev/acpi/acpivideo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpivideo.c,v 1.3 2009/06/03 00:36:59 pirofti Exp $ */
+/* $OpenBSD: acpivideo.c,v 1.4 2009/06/04 04:50:08 pirofti Exp $ */
/*
* Copyright (c) 2008 Federico G. Schwindt <fgsch@openbsd.org>
*
@@ -97,6 +97,7 @@ acpivideo_attach(struct device *parent, struct device *self, void *aux)
acpivideo_get_dod(sc);
aml_find_node(aaa->aaa_node, "_DCS", acpi_foundvout, sc);
+ aml_find_node(aaa->aaa_node, "_BCL", acpi_foundvout, sc);
}
int
@@ -170,6 +171,11 @@ acpi_foundvout(struct aml_node *node, void *arg)
av.aaa.aaa_node = node->parent;
av.aaa.aaa_name = "acpivout";
av.dod = sc->sc_dod[i];
+ /*
+ * Make sure we don't attach twice if both _BCL and
+ * _DCS methods are found by zeroing the DOD address.
+ */
+ sc->sc_dod[i] = 0;
config_found(self, &av, acpivideo_print);
}