__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>
+#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;
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
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,