[RAMEN9610-20876][MODAP-53888][COMMON] chub: change resume from complete to resume
authorBoojin Kim <boojin.kim@samsung.com>
Thu, 7 Nov 2019 07:49:32 +0000 (16:49 +0900)
committerlulu2 <lulu2@lenovo.com>
Wed, 13 Nov 2019 06:48:29 +0000 (14:48 +0800)
Change-Id: Ia51cc7ccea3f8025ad23b493c9d4830060837f27
Signed-off-by: Sukwon Ryoo <sw.ryoo@samsung.com>
drivers/staging/nanohub/chub.c
drivers/staging/nanohub/main.c

index d06f927d67fd84b5494c5cf41507b663188d020e..39174abb45794e2d42a64a301ee90f28d243b722 100644 (file)
@@ -1786,7 +1786,7 @@ static int contexthub_suspend(struct device *dev)
 #endif
 }
 
-static void contexthub_resume(struct device *dev)
+static int contexthub_resume(struct device *dev)
 {
        struct contexthub_ipc_info *ipc = dev_get_drvdata(dev);
 #ifdef CONFIG_CHRE_SENSORHUB_HAL
@@ -1795,7 +1795,7 @@ static void contexthub_resume(struct device *dev)
 
        int ret;
        if (atomic_read(&ipc->chub_status) != CHUB_ST_RUN)
-               return;
+               return 0;
 
        dev_info(dev, "nanohub log to kernel on\n");
        ipc_hw_write_shared_reg(AP, AP_WAKE, SR_3);
@@ -1804,13 +1804,13 @@ static void contexthub_resume(struct device *dev)
 #ifdef CONFIG_CHRE_SENSORHUB_HAL
        ret = nanohub_resume(data->iio_dev);
 #endif
-       return;
+       return 0;
 }
 
 //static SIMPLE_DEV_PM_OPS(contexthub_pm_ops, contexthub_suspend, contexthub_resume);
 static const struct dev_pm_ops contexthub_pm_ops = {
-       .prepare = contexthub_suspend,
-       .complete = contexthub_resume,
+       .suspend = contexthub_suspend,
+       .resume = contexthub_resume,
 };
 
 static const struct of_device_id contexthub_ipc_match[] = {
index 9df7cc7a365f8f437348ee5ddd74cfc796efb643..64717c56ab45a4803c08baf6ded3183f2aa17038 100644 (file)
@@ -1685,16 +1685,6 @@ static int nanohub_kthread(void *arg)
                                dev_info(sensor_dev,
                                         "%s: request_wakeup_timeout: ret=%d, err_cnt:%d\n",
                                         __func__, ret, data->kthread_err_cnt);
-#ifdef CONFIG_NANOHUB_MAILBOX
-                               data->kthread_err_cnt++;
-                               if (data->kthread_err_cnt >= KTHREAD_WARN_CNT) {
-                                       dev_err(sensor_dev,
-                                               "%s: kthread_err_cnt=%d\n",
-                                               __func__,
-                                               data->kthread_err_cnt);
-                                       nanohub_set_state(data, ST_ERROR);
-                               }
-#endif
                                continue;
                        }