1
0
Fork 0

gpu: fix do_gettimeofday build error

This api was removed from kernel. Use new instead.

../drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c: In function ‘gckOS_GetTime’:
../drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:3006:5: error: implicit declaration of function ‘do_gettimeofday’ [-Werror=implicit-function-declaration]
     do_gettimeofday(&tv);

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Dong Aisheng 2019-04-07 22:10:07 +08:00
parent a780e02ff3
commit 5ec394df46
1 changed files with 3 additions and 3 deletions

View File

@ -2999,12 +2999,12 @@ gckOS_GetTime(
OUT gctUINT64_PTR Time
)
{
struct timeval tv;
struct timespec64 tv;
gcmkHEADER();
/* Return the time of day in microseconds. */
do_gettimeofday(&tv);
*Time = (tv.tv_sec * 1000000ULL) + tv.tv_usec;
ktime_get_real_ts64(&tv);
*Time = (tv.tv_sec * 1000000ULL) + tv.tv_nsec / 1000;
gcmkFOOTER_NO();
return gcvSTATUS_OK;