From 71debf2e192f1f436572c2b45532c07e52495ea2 Mon Sep 17 00:00:00 2001 From: Yuchou Gan Date: Fri, 2 Mar 2018 17:58:29 +0800 Subject: [PATCH] MGS-3705-1 [#imx-939] fix gpu build for 4.14 linux kernel "DRIVER_ATTR" no longer supported in 4.14 linux kernel, using "DRIVER_ATTR_RW" to replace it. Signed-off-by: Yuchou Gan (cherry picked from commit cee4766bd6dc3d48e95578098ef981ec67af8153) --- .../platform/freescale/gc_hal_kernel_platform_imx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c index cad3e870967b..0bc059c34589 100644 --- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c +++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c @@ -317,7 +317,7 @@ static struct notifier_block thermal_hot_pm_notifier = .notifier_call = thermal_hot_pm_notify, }; -static ssize_t show_gpu3DMinClock(struct device_driver *dev, char *buf) +static ssize_t gpu3DMinClock_show(struct device_driver *dev, char *buf) { gctUINT currentf,minf,maxf; gckGALDEVICE galDevice; @@ -335,7 +335,7 @@ static ssize_t show_gpu3DMinClock(struct device_driver *dev, char *buf) return strlen(buf); } -static ssize_t update_gpu3DMinClock(struct device_driver *dev, const char *buf, size_t count) +static ssize_t gpu3DMinClock_store(struct device_driver *dev, const char *buf, size_t count) { gctINT fields; @@ -357,7 +357,7 @@ static ssize_t update_gpu3DMinClock(struct device_driver *dev, const char *buf, return count; } -static DRIVER_ATTR(gpu3DMinClock, S_IRUGO | S_IWUSR, show_gpu3DMinClock, update_gpu3DMinClock); +static DRIVER_ATTR_RW(gpu3DMinClock); #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) @@ -421,7 +421,7 @@ struct imx_priv static struct imx_priv imxPriv; #if defined(CONFIG_PM_OPP) -static ssize_t show_gpuMode(struct device_driver *dev, char *buf) +static ssize_t gpu_mode_show(struct device_driver *dev, char *buf) { struct imx_priv *priv = &imxPriv; char buffer[512]; @@ -470,7 +470,7 @@ static ssize_t show_gpuMode(struct device_driver *dev, char *buf) return strlen(buf); } -static ssize_t update_gpuMode(struct device_driver *dev, const char *buf, size_t count) +static ssize_t gpu_mode_store(struct device_driver *dev, const char *buf, size_t count) { unsigned long core_freq = 0; unsigned long shader_freq = 0; @@ -515,7 +515,7 @@ static ssize_t update_gpuMode(struct device_driver *dev, const char *buf, size_t return count; } -static DRIVER_ATTR(gpu_mode, S_IRUGO | S_IWUSR, show_gpuMode, update_gpuMode); +static DRIVER_ATTR_RW(gpu_mode); int init_gpu_opp_table(struct device *dev) { -- 2.17.1