sdm: Enable only required events in poll.
Initialize poll fd to zero before enabling required
events POLLIN and POLLPRI. This will avoid SDM_EventThread
to wake up continuously for POLLOUT events.
Change-Id: I7f8ce2c0e6e6882e0c7fe1f6a39dc46dbf742ebc
CRs-Fixed: 1033431
diff --git a/sdm/libs/core/fb/hw_events.cpp b/sdm/libs/core/fb/hw_events.cpp
index 5ae53a4..4015796 100644
--- a/sdm/libs/core/fb/hw_events.cpp
+++ b/sdm/libs/core/fb/hw_events.cpp
@@ -80,7 +80,7 @@
pollfd HWEvents::InitializePollFd(HWEventData *event_data) {
char node_path[kMaxStringLength] = {0};
char data[kMaxStringLength] = {0};
- pollfd poll_fd;
+ pollfd poll_fd = {0};
poll_fd.fd = -1;
if (!strncmp(event_data->event_name, "thread_exit", strlen("thread_exit"))) {