From e58826d065fca3b153adad6cc9acd7466657c798 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Fri, 26 Jul 2013 17:36:30 +0800 Subject: [PATCH] ENGR00240988: gpu: __devinit and __devexit are unavailable on 3.10 kernel MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit __devinit, __devexit and __devexit_p are unavailable on 3.10 kernel. Remove them for 3.10 to fix the compile issues below. CC drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.o drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c:1033:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gpu_probe’ drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c:1116:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gpu_remove’ drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c:1292:19: error: ‘gpu_probe’ undeclared here (not in a function) drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c:1293:5: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration] Signed-off-by: Shawn Guo --- .../hal/os/linux/kernel/gc_hal_kernel_driver.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c index 7d475642719a..2232fefb2019 100644 --- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c +++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c @@ -1030,7 +1030,11 @@ static struct notifier_block thermal_hot_pm_notifier = { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) +static int gpu_probe(struct platform_device *pdev) +#else static int __devinit gpu_probe(struct platform_device *pdev) +#endif { int ret = -ENODEV; struct resource* res; @@ -1113,7 +1117,11 @@ static int __devinit gpu_probe(struct platform_device *pdev) return ret; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) +static int gpu_remove(struct platform_device *pdev) +#else static int __devexit gpu_remove(struct platform_device *pdev) +#endif { gcmkHEADER(); #if gcdENABLE_FSCALE_VAL_ADJUST @@ -1290,7 +1298,11 @@ static const struct dev_pm_ops gpu_pm_ops = { static struct platform_driver gpu_driver = { .probe = gpu_probe, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) + .remove = gpu_remove, +#else .remove = __devexit_p(gpu_remove), +#endif .suspend = gpu_suspend, .resume = gpu_resume, -- 2.39.5