acpi_asus(4): Bring in a small fix from FreeBSD.
authorSascha Wildner <saw@online.de>
Wed, 9 May 2012 21:17:02 +0000 (23:17 +0200)
committerSascha Wildner <saw@online.de>
Wed, 9 May 2012 21:17:15 +0000 (23:17 +0200)
Prefer correct and simpler backlight control methods for ASUS G2K laptop.

Taken-from: FreeBSD

sys/dev/acpica5/acpi_asus/acpi_asus.c

index 14101a2..a64ad0a 100644 (file)
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/acpi_support/acpi_asus.c,v 1.42 2009/06/05 18:44:36 jkim Exp
+ * $FreeBSD: src/sys/dev/acpi_support/acpi_asus.c,v 1.44 2010/06/11 20:08:20 jkim Exp $
  */
 
 /*
@@ -271,8 +271,8 @@ static struct acpi_asus_model acpi_asus_models[] = {
                .wled_set       = "WLED",
                .brn_get        = "GPLV",
                .brn_set        = "SPLV",
-               .lcd_get        = "\\_SB.PCI0.SBRG.EC0.RPIN",
-               .lcd_set        = "\\_SB.PCI0.SBRG.EC0._Q10",
+               .lcd_get        = "GBTL",
+               .lcd_set        = "SBTL",
                .disp_get       = "\\_SB.PCI0.PCE2.VGA.GETD",
                .disp_set       = "SDSP",
        },
@@ -1143,26 +1143,7 @@ acpi_asus_sysctl_init(struct acpi_asus_softc *sc, int method)
                return (FALSE);
        case ACPI_ASUS_METHOD_LCD:
                if (sc->model->lcd_get) {
-                       if (strncmp(sc->model->name, "G2K", 3) == 0) {
-                               ACPI_BUFFER             Buf;
-                               ACPI_OBJECT             Arg, Obj;
-                               ACPI_OBJECT_LIST        Args;
-
-                               Arg.Type = ACPI_TYPE_INTEGER;
-                               Arg.Integer.Value = 0x11;
-                               Args.Count = 1;
-                               Args.Pointer = &Arg;
-                               Buf.Length = sizeof(Obj);
-                               Buf.Pointer = &Obj;
-
-                               status = AcpiEvaluateObject(sc->handle,
-                                   sc->model->lcd_get, &Args, &Buf);
-                               if (ACPI_SUCCESS(status) &&
-                                   Obj.Type == ACPI_TYPE_INTEGER) {
-                                       sc->s_lcd = Obj.Integer.Value;
-                                       return (TRUE);
-                               }
-                       } else if (strncmp(sc->model->name, "L3H", 3) == 0) {
+                       if (strncmp(sc->model->name, "L3H", 3) == 0) {
                                ACPI_BUFFER             Buf;
                                ACPI_OBJECT             Arg[2], Obj;
                                ACPI_OBJECT_LIST        Args;