From 3206acefccf6340b133dfcb7e4da1616b7ffa7b3 Mon Sep 17 00:00:00 2001 From: huangys Date: Tue, 11 Aug 2020 23:11:23 +0800 Subject: [PATCH] aw869xx: Fix build issue on V(CR) - mask unused pm_ops to fix warning error - add function do_gettimeofday which was removed in kernel 5.4 Change-Id: I33aae44467bc306fc2eed827e518d12c6ad0bad9 Signed-off-by: huangys Reviewed-on: https://gerrit.mot.com/1719561 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jianqi Yang Submit-Approved: Jira Key --- drivers/misc/awinic/aw869xx/aw869xx.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/misc/awinic/aw869xx/aw869xx.c b/drivers/misc/awinic/aw869xx/aw869xx.c index eb732370acbd..da7ca5b251b8 100644 --- a/drivers/misc/awinic/aw869xx/aw869xx.c +++ b/drivers/misc/awinic/aw869xx/aw869xx.c @@ -34,8 +34,8 @@ #include #include -#include -#include +#include "aw869xx_reg.h" +#include "aw869xx.h" /****************************************************** * @@ -76,6 +76,15 @@ static aw_snd_soc_codec_t *aw_get_codec(struct snd_soc_dai *dai) #endif } +static void do_gettimeofday(struct timeval *tv) +{ + struct timespec64 now; + + ktime_get_real_ts64(&now); + tv->tv_sec = now.tv_sec; + tv->tv_usec = now.tv_nsec/1000; +} + /****************************************************** * * variable @@ -4351,7 +4360,7 @@ static int __maybe_unused aw869xx_resume(struct device *dev) return ret; } -static SIMPLE_DEV_PM_OPS(aw869xx_pm_ops, aw869xx_suspend, aw869xx_resume); +// static SIMPLE_DEV_PM_OPS(aw869xx_pm_ops, aw869xx_suspend, aw869xx_resume); static const struct i2c_device_id aw869xx_i2c_id[] = { {AW869XX_I2C_NAME, 0},