]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00240988: gpu: __devinit and __devexit are unavailable on 3.10 kernel
authorShawn Guo <shawn.guo@freescale.com>
Fri, 26 Jul 2013 09:36:30 +0000 (17:36 +0800)
committerJason Liu <r64343@freescale.com>
Wed, 30 Oct 2013 01:53:59 +0000 (09:53 +0800)
__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 <shawn.guo@freescale.com>
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c

index 7d475642719aecb9da236d4623adaf18d5924934..2232fefb20198b3cabc4d7fb02577b80fa28a23f 100644 (file)
@@ -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,