From: Boojin Kim Date: Thu, 7 Nov 2019 07:49:32 +0000 (+0900) Subject: [RAMEN9610-20876][MODAP-53888][COMMON] chub: change resume from complete to resume X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b16d47f5dfa04a9660efd0f8062adf531114cb0b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [RAMEN9610-20876][MODAP-53888][COMMON] chub: change resume from complete to resume Change-Id: Ia51cc7ccea3f8025ad23b493c9d4830060837f27 Signed-off-by: Sukwon Ryoo --- diff --git a/drivers/staging/nanohub/chub.c b/drivers/staging/nanohub/chub.c index d06f927d67fd..39174abb4579 100644 --- a/drivers/staging/nanohub/chub.c +++ b/drivers/staging/nanohub/chub.c @@ -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[] = { diff --git a/drivers/staging/nanohub/main.c b/drivers/staging/nanohub/main.c index 9df7cc7a365f..64717c56ab45 100644 --- a/drivers/staging/nanohub/main.c +++ b/drivers/staging/nanohub/main.c @@ -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; }