Fix dlsym() caller for get_display_conf 10/242610/2 accepted/tizen/unified/20200903.151740 submit/tizen/20200903.015250
authorYunmi Ha <yunmi.ha@samsung.com>
Fri, 28 Aug 2020 08:41:33 +0000 (17:41 +0900)
committerYunmi Ha <yunmi.ha@samsung.com>
Thu, 3 Sep 2020 01:30:26 +0000 (10:30 +0900)
Change-Id: If9eac834f99620e52807881c321d2f08e4a6e194

src/touchscreen/touchscreen.c

index adc244c..44ad171 100644 (file)
@@ -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'.