725 }
726 if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle,"_BQC",&h_dummy1)))
727 device->cap._BQC = 1;
728 if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DDC", &h_dummy1))) {
729 device->cap._DDC = 1;
730 }
731 if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DCS", &h_dummy1))) {
732 device->cap._DCS = 1;
733 }
734 if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DGS", &h_dummy1))) {
735 device->cap._DGS = 1;
736 }
737 if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DSS", &h_dummy1))) {
738 device->cap._DSS = 1;
739 }
740
741 if (acpi_video_backlight_support())
742 max_level = acpi_video_init_brightness(device);
743
744 if (device->cap._BCL && device->cap._BCM && max_level > 0) {
745 int result;
746 static int count = 0;
747 char *name;
748 name = kzalloc(MAX_NAME_LEN, GFP_KERNEL);
749 if (!name)
750 return;
751
752 sprintf(name, "acpi_video%d", count++);
753 device->backlight = backlight_device_register(name,
754 NULL, device, &acpi_backlight_ops);
755 device->backlight->props.max_brightness = device->brightness->count-3;
756
757
758
759
760
761 if (device->cap._BQC)
762 device->backlight->props.brightness =
763 acpi_video_get_brightness(device->backlight);
764 else
765 device->backlight->props.brightness =