From 92e8a07ac55606c87a0001be68af786bce12c13d Mon Sep 17 00:00:00 2001 From: jiaziyangnewer Date: Wed, 17 May 2023 10:01:58 +0800 Subject: [PATCH] fix:using correct version macro for access_ok function. Signed-off-by: jiaziyangnewer --- adapter/khdf/linux/platform/mipi_dsi/mipi_tx_dev.c | 8 ++++---- adapter/khdf/linux/platform/mipi_dsi/mipi_tx_hi35xx.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/adapter/khdf/linux/platform/mipi_dsi/mipi_tx_dev.c b/adapter/khdf/linux/platform/mipi_dsi/mipi_tx_dev.c index ca24d111c..c46a136c2 100644 --- a/adapter/khdf/linux/platform/mipi_dsi/mipi_tx_dev.c +++ b/adapter/khdf/linux/platform/mipi_dsi/mipi_tx_dev.c @@ -326,7 +326,7 @@ static int32_t MipiDsiDevSetCfg(struct MipiDsiCntlr *cntlr, struct MipiCfg *arg) } if (access_ok( -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) VERIFY_READ, #endif arg, size)) { /* user space */ @@ -375,7 +375,7 @@ static int32_t MipiDsiDevSetCmd(struct MipiDsiCntlr *cntlr, struct DsiCmdDesc *a } if (access_ok( -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) VERIFY_READ, #endif arg, size)) { /* user space */ @@ -402,7 +402,7 @@ static int32_t MipiDsiDevSetCmd(struct MipiDsiCntlr *cntlr, struct DsiCmdDesc *a static int32_t MipiDsiDevCmdCopyFromUser(GetDsiCmdDescTag *arg, GetDsiCmdDescTag *temp, uint32_t *size) { if (access_ok( -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) VERIFY_READ, #endif arg, *size)) { /* user space */ @@ -420,7 +420,7 @@ static int32_t MipiDsiDevCmdCopyFromUser(GetDsiCmdDescTag *arg, GetDsiCmdDescTag static int32_t MipiDsiDevCmdCopyToUser(GetDsiCmdDescTag *arg, GetDsiCmdDescTag *temp, uint32_t *size) { if (access_ok( -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) VERIFY_WRITE, #endif arg, *size)) { /* user space */ diff --git a/adapter/khdf/linux/platform/mipi_dsi/mipi_tx_hi35xx.c b/adapter/khdf/linux/platform/mipi_dsi/mipi_tx_hi35xx.c index 566e02cb9..0c1cccf27 100644 --- a/adapter/khdf/linux/platform/mipi_dsi/mipi_tx_hi35xx.c +++ b/adapter/khdf/linux/platform/mipi_dsi/mipi_tx_hi35xx.c @@ -710,7 +710,7 @@ static int32_t LinuxCopyToKernel(void *dest, uint32_t max, const void *src, uint int32_t ret; if (access_ok( -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) VERIFY_READ, #endif src, count)) { /* user space */ @@ -918,7 +918,7 @@ static int MipiTxDrvGetCmdInfo(GetCmdInfoTag *getCmdInfo) goto fail0; } if (access_ok( -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) VERIFY_WRITE, #endif getCmdInfo->getData, getCmdInfo->getDataSize)) { /* user space */ -- Gitee