--- firegl_public.c.orig 2011-05-10 22:19:26.395914392 +0200 +++ firegl_public.c 2011-05-11 01:40:36.967379590 +0200 @@ -114,7 +114,9 @@ #include #include #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39) #include +#endif // newer SuSE kernels need this #include @@ -1049,7 +1051,11 @@ static int __init firegl_init_module(voi dev->pubdev.signature = FGL_DEVICE_SIGNATURE; for (i = 0; i < __KE_MAX_SPINLOCKS; i++) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39) dev->spinlock[i] = SPIN_LOCK_UNLOCKED; +#else + dev->spinlock[i] = __SPIN_LOCK_UNLOCKED(old_style_spin_init); +#endif for (i=0; i < __KE_MAX_SEMAPHORES; i++) sema_init(&dev->struct_sem[i], 1); @@ -1900,13 +1906,17 @@ void ATI_API_CALL KCL_spin_unlock(void * /** \brief Grab global kernel lock */ void ATI_API_CALL KCL_GlobalKernelLock(void) { +#ifdef CONFIG_KERNEL_LOCK lock_kernel(); +#endif } /** \brief Release global kernel lock */ void ATI_API_CALL KCL_GlobalKernelUnlock(void) { +#ifdef CONFIG_KERNEL_LOCK unlock_kernel(); +#endif } /*****************************************************************************/ --- drmP.h.orig 2011-05-10 22:17:00.000000000 +0200 +++ drmP.h 2011-05-11 01:32:09.399610802 +0200 @@ -57,7 +57,9 @@ #include #include #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39) #include /* For (un)lock_kernel */ +#endif #include #include #if defined(__alpha__) || defined(__powerpc__) #if defined(__alpha__) || defined(__powerpc__)