msm8953-common: power: Remove display_pwr node
* Our 3.18 kernel doesn,t support this. logcat spams like this "E QTI PowerHAL: Error opening /sys/kernel/hbtp/display_pwr: No such file or directory" Signed-off-by: muralivijay <muralidharan9845@gmail.com>
This commit is contained in:
@@ -37,7 +37,6 @@
|
||||
#include <dlfcn.h>
|
||||
#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define LOG_TAG "QTI PowerHAL"
|
||||
#include <utils/Log.h>
|
||||
@@ -62,9 +61,6 @@ static int camera_hint_ref_count;
|
||||
static void process_video_encode_hint(void *metadata);
|
||||
//static void process_cam_preview_hint(void *metadata);
|
||||
|
||||
static int display_fd;
|
||||
#define SYS_DISPLAY_PWR "/sys/kernel/hbtp/display_pwr"
|
||||
|
||||
static bool is_target_SDM632() /* Returns value=632 if target is SDM632 else value 0 */
|
||||
{
|
||||
int fd;
|
||||
@@ -107,13 +103,7 @@ int set_interactive_override(struct power_module *module, int on)
|
||||
char governor[80];
|
||||
char tmp_str[NODE_MAX];
|
||||
struct video_encode_metadata_t video_encode_metadata;
|
||||
int rc = 0;
|
||||
|
||||
static const char *display_on = "1";
|
||||
static const char *display_off = "0";
|
||||
char err_buf[80];
|
||||
static int init_interactive_hint = 0;
|
||||
static int set_i_count = 0;
|
||||
int rc;
|
||||
|
||||
ALOGI("Got set_interactive hint");
|
||||
|
||||
@@ -153,39 +143,6 @@ int set_interactive_override(struct power_module *module, int on)
|
||||
}
|
||||
saved_interactive_mode = !!on;
|
||||
|
||||
set_i_count ++;
|
||||
ALOGI("Got set_interactive hint on= %d, count= %d\n", on, set_i_count);
|
||||
|
||||
if (init_interactive_hint == 0)
|
||||
{
|
||||
//First time the display is turned off
|
||||
display_fd = TEMP_FAILURE_RETRY(open(SYS_DISPLAY_PWR, O_RDWR));
|
||||
if (display_fd < 0) {
|
||||
strerror_r(errno,err_buf,sizeof(err_buf));
|
||||
ALOGE("Error opening %s: %s\n", SYS_DISPLAY_PWR, err_buf);
|
||||
return HINT_HANDLED;
|
||||
}
|
||||
else
|
||||
init_interactive_hint = 1;
|
||||
}
|
||||
else
|
||||
if (!on ) {
|
||||
/* Display off. */
|
||||
rc = TEMP_FAILURE_RETRY(write(display_fd, display_off, strlen(display_off)));
|
||||
if (rc < 0) {
|
||||
strerror_r(errno,err_buf,sizeof(err_buf));
|
||||
ALOGE("Error writing %s to %s: %s\n", display_off, SYS_DISPLAY_PWR, err_buf);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Display on */
|
||||
rc = TEMP_FAILURE_RETRY(write(display_fd, display_on, strlen(display_on)));
|
||||
if (rc < 0) {
|
||||
strerror_r(errno,err_buf,sizeof(err_buf));
|
||||
ALOGE("Error writing %s to %s: %s\n", display_on, SYS_DISPLAY_PWR, err_buf);
|
||||
}
|
||||
}
|
||||
|
||||
return HINT_HANDLED;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user