From 55798963183d65a4e2a1b50deed79ca90888abe4 Mon Sep 17 00:00:00 2001 From: Yunmi Ha Date: Fri, 28 Aug 2020 17:41:33 +0900 Subject: [PATCH] Fix dlsym() caller for get_display_conf Change-Id: If9eac834f99620e52807881c321d2f08e4a6e194 --- src/touchscreen/touchscreen.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/touchscreen/touchscreen.c b/src/touchscreen/touchscreen.c index adc244c..44ad171 100644 --- a/src/touchscreen/touchscreen.c +++ b/src/touchscreen/touchscreen.c @@ -51,6 +51,7 @@ static struct display_config *_display_conf; static struct _backlight_ops *_backlight_ops; static struct _backlight_ops* (*_get_backlight_ops)(void); +static struct display_config* (*_get_display_config)(void); static void touchscreen_wakeup_status(keynode_t *key, void *data) { @@ -318,9 +319,13 @@ static void touchscreen_init(void *data) { int ret, val; - _display_conf = dlsym(disp_plgn->handle, "display_conf"); - if (!_display_conf) - _E("Failed to obtain address of display_conf, %s.", dlerror()); + _get_display_config = dlsym(disp_plgn->handle, "get_display_config"); + if (_get_display_config) { + _display_conf = _get_display_config(); + if (!_display_conf) + _E("Failed to get display config."); + } else + _E("Failed to obtain address of get_display_config, %s.", dlerror()); /* 'backlight_ops' is declared static and used a lot of places with same name. * So it fails that fetching symbol directly with name 'backlight_ops'. -- 2.7.4