fd = open(path, O_RDONLY);
if (fd < 0) {
strerror_r(errno, errno_str, sizeof(errno_str));
- ALOGE("Error opening %s: %s\n", path, errno_str);
+ ALOGE("Error opening %s: %s", path, errno_str);
return -1;
}
len = read(fd, s, num_bytes - 1);
if (len < 0) {
strerror_r(errno, errno_str, sizeof(errno_str));
- ALOGE("Error reading from %s: %s\n", path, errno_str);
+ ALOGE("Error reading from %s: %s", path, errno_str);
ret = -1;
} else {
fd = open(path, O_WRONLY);
if (fd < 0) {
strerror_r(errno, errno_str, sizeof(errno_str));
- ALOGE("Error opening %s: %s\n", path, errno_str);
+ ALOGE("Error opening %s: %s", path, errno_str);
return;
}
len = write(fd, s, strlen(s));
if (len < 0) {
strerror_r(errno, errno_str, sizeof(errno_str));
- ALOGE("Error writing to %s: %s\n", path, errno_str);
+ ALOGE("Error writing to %s: %s", path, errno_str);
}
close(fd);
fd = open(BOOST_PATH, O_WRONLY);
if (fd < 0) {
- ALOGE("Error opening %s\n", BOOST_PATH);
+ ALOGE("Error opening %s", BOOST_PATH);
return;
}
if (samsung_pwr->boostpulse_fd < 0) {
if (!boostpulse_warned) {
strerror_r(errno, errno_str, sizeof(errno_str));
- ALOGE("Error opening %s: %s\n", BOOSTPULSE_PATH, errno_str);
+ ALOGE("Error opening %s: %s", BOOSTPULSE_PATH, errno_str);
boostpulse_warned = true;
}
}
node_path = malloc(node_pathsize);
if (path == NULL || node_path == NULL) {
strerror_r(errno, errno_str, sizeof(errno_str));
- ALOGE("Out of memory: %s\n", errno_str);
+ ALOGE("Out of memory: %s", errno_str);
return;
}
snprintf(node_path, node_pathsize, "%s/%s", dir, "enabled");
if (strncmp(file_content, "sec_touchkey", 12) == 0) {
- ALOGV("%s: found touchkey path: %s\n", __func__, node_path);
+ ALOGV("%s: found touchkey path: %s", __func__, node_path);
samsung_pwr->touchkey_power_path = malloc(node_pathsize);
if (samsung_pwr->touchkey_power_path == NULL) {
strerror_r(errno, errno_str, sizeof(errno_str));
- ALOGE("Out of memory: %s\n", errno_str);
+ ALOGE("Out of memory: %s", errno_str);
return;
}
snprintf(samsung_pwr->touchkey_power_path, node_pathsize,
}
if (strncmp(file_content, "sec_touchscreen", 15) == 0) {
- ALOGV("%s: found touchscreen path: %s\n", __func__, node_path);
+ ALOGV("%s: found touchscreen path: %s", __func__, node_path);
samsung_pwr->touchscreen_power_path = malloc(node_pathsize);
if (samsung_pwr->touchscreen_power_path == NULL) {
strerror_r(errno, errno_str, sizeof(errno_str));
- ALOGE("Out of memory: %s\n", errno_str);
+ ALOGE("Out of memory: %s", errno_str);
return;
}
snprintf(samsung_pwr->touchscreen_power_path, node_pathsize,
sizeof(samsung_pwr->cpu0_hispeed_freq));
sysfs_read(CPU0_MAX_FREQ_PATH, samsung_pwr->cpu0_max_freq,
sizeof(samsung_pwr->cpu0_max_freq));
- ALOGV("%s: CPU 0 hispeed freq: %s\n", __func__, samsung_pwr->cpu0_hispeed_freq);
- ALOGV("%s: CPU 0 max freq: %s\n", __func__, samsung_pwr->cpu0_max_freq);
+ ALOGV("%s: CPU 0 hispeed freq: %s", __func__, samsung_pwr->cpu0_hispeed_freq);
+ ALOGV("%s: CPU 0 max freq: %s", __func__, samsung_pwr->cpu0_max_freq);
rc = stat(CPU4_HISPEED_FREQ_PATH, &sb);
if (rc == 0) {
sizeof(samsung_pwr->cpu4_hispeed_freq));
sysfs_read(CPU4_MAX_FREQ_PATH, samsung_pwr->cpu4_max_freq,
sizeof(samsung_pwr->cpu4_max_freq));
- ALOGV("%s: CPU 4 hispeed freq: %s\n", __func__, samsung_pwr->cpu4_hispeed_freq);
- ALOGV("%s: CPU 4 max freq: %s\n", __func__, samsung_pwr->cpu4_max_freq);
+ ALOGV("%s: CPU 4 hispeed freq: %s", __func__, samsung_pwr->cpu4_hispeed_freq);
+ ALOGV("%s: CPU 4 max freq: %s", __func__, samsung_pwr->cpu4_max_freq);
}
}
char touchkey_node[2];
int rc;
- ALOGV("power_set_interactive: %d\n", on);
+ ALOGV("power_set_interactive: %d", on);
// Get panel backlight brightness from lights HAL
// Do not disable any input devices if the screen is on but we are in a non-interactive state
if (!on) {
if (get_cur_panel_brightness() > 0) {
ALOGV("%s: Moving to non-interactive state, but screen is still on,"
- " not disabling input devices\n", __func__);
+ " not disabling input devices", __func__);
goto out;
}
}
out:
sysfs_write(IO_IS_BUSY_PATH, on ? "1" : "0");
- ALOGV("power_set_interactive: %d done\n", on);
+ ALOGV("power_set_interactive: %d done", on);
}
static void samsung_power_hint(struct power_module *module,
if (len < 0) {
strerror_r(errno, errno_str, sizeof(errno_str));
- ALOGE("Error writing to %s: %s\n", BOOSTPULSE_PATH, errno_str);
+ ALOGE("Error writing to %s: %s", BOOSTPULSE_PATH, errno_str);
}
}