[RAMEN9610-20768][9610] s2mu106_usbpd delete deadcode
authorJinsu Park <js00.park@samsung.com>
Mon, 28 Oct 2019 04:25:01 +0000 (13:25 +0900)
committerrobot <robot@samsung.com>
Sun, 3 Nov 2019 17:54:39 +0000 (02:54 +0900)
Change-Id: I2bac68122656f6f5276ff9dc4fb995eda15d4be3
Signed-off-by: Jinsu Park <js00.park@samsung.com>
drivers/ccic/s2mu106-usbpd.c

index 54e51ff462878fcfddea5c91cfb6ff58728c8ba8..bd93121893081009a04f4bcdd4f06973ea5e76e7 100644 (file)
@@ -317,28 +317,22 @@ static int s2mu106_usbpd_get_pmeter_current(struct s2mu106_usbpd_data *pdic_data
 static int s2mu106_usbpd_check_vbus(struct s2mu106_usbpd_data *pdic_data,
                                                                                                int volt, CCIC_VBUS_SEL mode)
 {
-       int delay = 20;
-       int retry = 100;
-       int i = 0;
        int ret = 0;
 
        if (mode == VBUS_OFF) {
-               for (i = 0; i < retry; i++) {
-                       ret = s2mu106_usbpd_get_pmeter_volt(pdic_data);
-                       if (ret < 0)
-                               return ret;
-
-                       if (pdic_data->pm_chgin < volt) {
-                               pr_info("%s chgin volt(%d) finish!\n", __func__,
-                                                                                               pdic_data->pm_chgin);
-                               return true;
-                       } else {
-                               pr_info("%s chgin volt(%d) waiting 400ms!\n",
-                                                                               __func__, pdic_data->pm_chgin);
-                               msleep(400);
-                               return true;
-                       }
-                       msleep(delay);
+               ret = s2mu106_usbpd_get_pmeter_volt(pdic_data);
+               if (ret < 0)
+                       return ret;
+
+               if (pdic_data->pm_chgin < volt) {
+                       pr_info("%s chgin volt(%d) finish!\n", __func__,
+                                                                                       pdic_data->pm_chgin);
+                       return true;
+               } else {
+                       pr_info("%s chgin volt(%d) waiting 400ms!\n",
+                                                                       __func__, pdic_data->pm_chgin);
+                       msleep(400);
+                       return true;
                }
        } else if (mode == VBUS_ON) {
                ret = s2mu106_usbpd_get_pmeter_volt(pdic_data);