extcon: initialize on calling extcon_enable_device() 29/266029/2 accepted/tizen/unified/20211105.130437 submit/tizen/20211104.080231
authorYoungjae Cho <y0.cho@samsung.com>
Thu, 4 Nov 2021 06:52:52 +0000 (15:52 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Thu, 4 Nov 2021 07:57:04 +0000 (16:57 +0900)
Change-Id: Id128ded4a79fc63172cd35aeb00fa940c5c00709
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/extcon/extcon.c

index 3af9f94..8a93315 100644 (file)
@@ -149,6 +149,9 @@ int extcon_enable_device(const char *name)
        struct extcon_ops *dev;
        int ret;
 
+       if (!delayed_init_done(NULL))
+               extcon_deferred_init();
+
        dev = find_extcon(name);
        if (!dev)
                return -ENODEV;