[RAMEN9610-12909][COMMON] muic: irq init sequnece change
authorKim Taejeong <tj.kim@samsung.com>
Tue, 5 Mar 2019 05:27:35 +0000 (14:27 +0900)
committerhskang <hs1218.kang@samsung.com>
Thu, 7 Mar 2019 01:23:46 +0000 (10:23 +0900)
Problem: Kernel panic
Cause: Before work queue init, the work is called in ISR
Solution: Sequence is modified that the order on work queue and irq init
is reversed.

Change-Id: I99dfac1f36d01bb1c608e71cb88a95ad190aa34f
Signed-off-by: Kim Taejeong <tj.kim@samsung.com>
drivers/muic/s2mu106-muic.c

index c8078ed64149a24d2978bb1ce0dd607604933746..16b7a1b6991b1def83bd46a77da5e07ad1dee304 100644 (file)
@@ -2503,12 +2503,6 @@ static int s2mu106_muic_probe(struct platform_device *pdev)
        }
 #endif /* CONFIG_HV_MUIC_S2MU106_AFC */
 
-       ret = s2mu106_muic_irq_init(muic_data);
-       if (ret) {
-               pr_err("%s failed to init irq(%d)\n", __func__, ret);
-               goto fail_init_irq;
-       }
-
        pr_info("%s muic_if->opmode(%d)\n", __func__, muic_if->opmode);
 
        INIT_DELAYED_WORK(&muic_data->dcd_recheck, s2mu106_muic_dcd_recheck);
@@ -2544,6 +2538,12 @@ static int s2mu106_muic_probe(struct platform_device *pdev)
        }
 #endif
 
+       ret = s2mu106_muic_irq_init(muic_data);
+       if (ret) {
+               pr_err("%s failed to init irq(%d)\n", __func__, ret);
+               goto fail_init_irq;
+       }
+
        if (muic_if->opmode == OPMODE_MUIC) {
 #if IS_ENABLED(CONFIG_MUIC_S2MU106_RID)
                s2mu106_muic_adc_change_isr(-1, muic_data);