diff options
author | Daniel Hillenbrand <daniel.hillenbrand@codeworkx.de> | 2012-07-22 15:34:24 +0200 |
---|---|---|
committer | Daniel Hillenbrand <daniel.hillenbrand@codeworkx.de> | 2012-07-22 15:34:24 +0200 |
commit | 29deaa07a920f242d8b2766fba3c8ffa374b1eaf (patch) | |
tree | 6df0d3c9cc26de4513fb0d2d1124f94e9ebd2de2 /exynos4/exynos4210 | |
parent | 75ae0a2bc5d5a44eee72c3f5deaad54aaacfc573 (diff) | |
download | android_hardware_samsung-29deaa07a920f242d8b2766fba3c8ffa374b1eaf.tar.gz android_hardware_samsung-29deaa07a920f242d8b2766fba3c8ffa374b1eaf.tar.bz2 android_hardware_samsung-29deaa07a920f242d8b2766fba3c8ffa374b1eaf.zip |
exynos4210 lights: jellybean compat
Diffstat (limited to 'exynos4/exynos4210')
-rw-r--r-- | exynos4/exynos4210/liblights/lights.c | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/exynos4/exynos4210/liblights/lights.c b/exynos4/exynos4210/liblights/lights.c index c8b455f..fe1e83f 100644 --- a/exynos4/exynos4210/liblights/lights.c +++ b/exynos4/exynos4210/liblights/lights.c @@ -95,7 +95,7 @@ write_int(char const* path, int value) return amt == -1 ? -errno : 0; } else { if (already_warned == 0) { - LOGE("write_int failed to open %s\n", path); + ALOGE("write_int failed to open %s\n", path); already_warned = 1; } return -errno; @@ -108,7 +108,7 @@ static int write_str(char const *path, char const *str) int fd; static int already_warned = 0; - LOGV("write_str: path=\"%s\", str=\"%s\".", path, str); + ALOGV("write_str: path=\"%s\", str=\"%s\".", path, str); fd = open(path, O_RDWR); if (fd >= 0) { @@ -117,7 +117,7 @@ static int write_str(char const *path, char const *str) return amt == -1 ? -errno : 0; } else { if (already_warned == 0) { - LOGE("write_str failed to open %s\n", path); + ALOGE("write_str failed to open %s\n", path); already_warned = 1; } return -errno; @@ -168,7 +168,7 @@ static void comp_led_states(struct led_state *red, struct led_state *blue, delay_off = state->flashOffMS; break; default: - LOGI("Unsuported flashMode %d, default to NONE.", state->flashMode); + ALOGI("Unsuported flashMode %d, default to NONE.", state->flashMode); case LIGHT_FLASH_NONE: delay_on = delay_off = 0; break; @@ -182,7 +182,7 @@ static void comp_led_states(struct led_state *red, struct led_state *blue, blue->delay_on = delay_on; blue->delay_off = delay_off; - LOGV("comp_led_states: red=(%u, %d, %d), blue=(%u, %d, %d).", + ALOGV("comp_led_states: red=(%u, %d, %d), blue=(%u, %d, %d).", red->enabled, red->delay_on, red->delay_off, blue->enabled, blue->delay_on, blue->delay_off); } @@ -248,13 +248,6 @@ set_light_backlight(struct light_device_t* dev, } static int -set_light_keyboard(struct light_device_t* dev, - struct light_state_t const* state) -{ - return 0; -} - -static int set_light_buttons(struct light_device_t* dev, struct light_state_t const* state) { @@ -267,7 +260,7 @@ set_light_buttons(struct light_device_t* dev, int err = 0; pthread_mutex_lock(&g_lock); - LOGD("set_light_button on=%d\n", g_enable_touchlight ? 1 : 0); + ALOGD("set_light_button on=%d\n", g_enable_touchlight ? 1 : 0); err = write_int(BUTTON_FILE, g_enable_touchlight ? 1 : 0); pthread_mutex_unlock(&g_lock); @@ -282,7 +275,7 @@ set_light_battery(struct light_device_t* dev, int res = 0; #ifdef LED_NOTIFICATION - LOGD("set_light_battery: color=%#010x, fM=%u, fOnMS=%d, fOffMs=%d.", + ALOGD("set_light_battery: color=%#010x, fM=%u, fOnMS=%d, fOffMs=%d.", state->color, state->flashMode, state->flashOnMS, state->flashOffMS); pthread_mutex_lock(&g_lock); @@ -305,7 +298,7 @@ set_light_notification(struct light_device_t* dev, int res = 0; #ifdef LED_NOTIFICATION - LOGD("set_light_notification: color=%#010x, fM=%u, fOnMS=%d, fOffMs=%d.", + ALOGD("set_light_notification: color=%#010x, fM=%u, fOnMS=%d, fOffMs=%d.", state->color, state->flashMode, state->flashOnMS, state->flashOffMS); pthread_mutex_lock(&g_lock); @@ -322,13 +315,6 @@ set_light_notification(struct light_device_t* dev, } static int -set_light_attention(struct light_device_t* dev, - struct light_state_t const* state) -{ - return 0; -} - -static int close_lights(struct light_device_t *dev) { if (dev) { @@ -348,9 +334,6 @@ static int open_lights(const struct hw_module_t* module, char const* name, if (0 == strcmp(LIGHT_ID_BACKLIGHT, name)) { set_light = set_light_backlight; } - else if (0 == strcmp(LIGHT_ID_KEYBOARD, name)) { - set_light = set_light_keyboard; - } else if (0 == strcmp(LIGHT_ID_BUTTONS, name)) { set_light = set_light_buttons; } @@ -360,9 +343,6 @@ static int open_lights(const struct hw_module_t* module, char const* name, else if (0 == strcmp(LIGHT_ID_NOTIFICATIONS, name)) { set_light = set_light_notification; } - else if (0 == strcmp(LIGHT_ID_ATTENTION, name)) { - set_light = set_light_attention; - } else { return -EINVAL; } @@ -387,7 +367,7 @@ static struct hw_module_methods_t lights_module_methods = { .open = open_lights, }; -const struct hw_module_t HAL_MODULE_INFO_SYM = { +struct hw_module_t HAL_MODULE_INFO_SYM = { .tag = HARDWARE_MODULE_TAG, .version_major = 1, .version_minor = 0, |