From d991d04b111afba23e95f20f9c6b6d1b6d3ba6d2 Mon Sep 17 00:00:00 2001 From: Donghwa Lee Date: Wed, 20 Mar 2013 13:16:18 +0900 Subject: [PATCH] Fix OEM_sys_get_backlight_brightness_by_lux() parameter Fix OEM_sys_get_backlight_brightness_by_lux() function parameter. And unnecessay function code was removed and just return success. Signed-off-by: Donghwa Lee --- include/devman_plugin_intf.h | 2 +- src/device_manager_plugin_exynos.c | 56 +++----------------------------------- 2 files changed, 5 insertions(+), 53 deletions(-) diff --git a/include/devman_plugin_intf.h b/include/devman_plugin_intf.h index 06c9cac..ff7492f 100644 --- a/include/devman_plugin_intf.h +++ b/include/devman_plugin_intf.h @@ -159,7 +159,7 @@ typedef struct { int (*OEM_sys_get_cpufreq_scaling_min_freq) (int *value); int (*OEM_sys_set_cpufreq_scaling_min_freq) (int value); - int (*OEM_sys_get_backlight_brightness_by_lux) (int lux, int status); + int (*OEM_sys_get_backlight_brightness_by_lux) (int lux, int *value); } OEM_sys_devman_plugin_interface; diff --git a/src/device_manager_plugin_exynos.c b/src/device_manager_plugin_exynos.c index cba138d..826a9c5 100644 --- a/src/device_manager_plugin_exynos.c +++ b/src/device_manager_plugin_exynos.c @@ -97,60 +97,12 @@ struct display_info int lcd_index; struct display_info disp_info[DISP_MAX]; -int OEM_sys_get_backlight_brightness_by_lux(unsigned int lux, enum lux_status status) +/* This function is not supported */ +int OEM_sys_get_backlight_brightness_by_lux(unsigned int lux, int *value) { - static int brightness = -1; + /* TODO */ - if (status == no_change) { - if (brightness == -1) - status = increment; - else - return brightness; - } - if (status == decrement) { - switch (lux) { - case 10000 ... 0xffffffff: - brightness = 100; - break; - case 1000 ... 9999: - brightness = 80; - break; - case 75 ... 999: - brightness = 60; - break; - case 7 ... 74: - brightness = 40; - break; - case 0 ... 6: - brightness = 1; - break; - default: - return -1; - } - } else if (status == increment) { - switch (lux) { - case 15001 ... 0xffffffff: - brightness = 100; - break; - case 1501 ... 15000: - brightness = 80; - break; - case 151 ... 1500: - brightness = 60; - break; - case 16 ... 150: - brightness = 40; - break; - case 0 ... 15: - brightness = 1; - break; - default: - return -1; - } - } else - return -1; - - return brightness; + return 0; } static int OEM_sys_display_info(struct display_info *disp_info) -- 2.7.4