[PATCH 11/11] compal: fingers off backlight if video.ko is serving this functionality

Thomas Renninger
2008-07-16T10:52:36Z

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Thomas Renninger <trenn@stravinsky.suse.de>
---
drivers/misc/compal-laptop.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/misc/compal-laptop.c b/drivers/misc/compal-laptop.c
index 971e59a..f03cfbf 100644
--- a/drivers/misc/compal-laptop.c
+++ b/drivers/misc/compal-laptop.c
@@ -326,12 +326,14 @@ static int __init compal_init(void)

/* Register backlight stuff */

- compalbl_device = backlight_device_register("compal-laptop", NULL, NULL,
- &compalbl_ops);
- if (IS_ERR(compalbl_device))
- return PTR_ERR(compalbl_device);
-
- compalbl_device->props.max_brightness = COMPAL_LCD_LEVEL_MAX-1;
+ if (!acpi_video_backlight_support()) {
+ compalbl_device = backlight_device_register("compal-laptop", NULL, NULL,
+ &compalbl_ops);
+ if (IS_ERR(compalbl_device))
+ return PTR_ERR(compalbl_device);
+
+ compalbl_device->props.max_brightness = COMPAL_LCD_LEVEL_MAX-1;
+ }

ret = platform_driver_register(&compal_driver);
if (ret)
--
1.5.4.5