summaryrefslogtreecommitdiff
path: root/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp
diff options
context:
space:
mode:
authorHyunKyung Kim <hk310.kim@samsung.com>2019-09-20 10:54:58 +0900
committerHyunKyung Kim <hk310.kim@samsung.com>2019-10-28 13:47:50 +0900
commit34eeab6d05a4e5d79f8b55792ee0c79dc2aa46a1 (patch)
tree4085b204600603188443162615ebd6915e566473 /libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp
parent6dab5aec432533e6325c04a3e24a4365f3cda9e0 (diff)
libhwc2.1: Clean up ExynosDeviceDrmInterface code
Change-Id: I6784dcc3d78d144bcb845d658fab7d9bd482db02 Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com>
Diffstat (limited to 'libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp')
-rw-r--r--libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp b/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp
index cbb5358..486496f 100644
--- a/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp
+++ b/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp
@@ -41,7 +41,7 @@ void ExynosDeviceDrmInterface::init(ExynosDevice *exynosDevice)
updateRestrictions();
mExynosDrmEventHandler.init(mExynosDevice);
- mDrmDevice->event_listener()->RegisterHotplugHandler((DrmEventHandler *)&mExynosDrmEventHandler);
+ mDrmDevice->event_listener()->RegisterHotplugHandler(static_cast<DrmEventHandler *>(&mExynosDrmEventHandler));
ExynosDisplay *primaryDisplay = mExynosDevice->getDisplay(HWC_DISPLAY_PRIMARY);
if (primaryDisplay != NULL) {
@@ -69,6 +69,7 @@ void ExynosDeviceDrmInterface::ExynosDrmEventHandler::init(ExynosDevice *exynosD
void ExynosDeviceDrmInterface::ExynosDrmEventHandler::HandleEvent(uint64_t timestamp_us)
{
/* TODO: Check plug status hear or ExynosExternalDisplay::handleHotplugEvent() */
- ExynosExternalDisplayModule *display = (ExynosExternalDisplayModule*)mExynosDevice->getDisplay(HWC_DISPLAY_EXTERNAL);
- display->handleHotplugEvent();
+ ExynosExternalDisplayModule *display = static_cast<ExynosExternalDisplayModule*>(mExynosDevice->getDisplay(HWC_DISPLAY_EXTERNAL));
+ if (display != NULL)
+ display->handleHotplugEvent();
}