#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5)
#include <linux/types.h>
#include <asm/atomic.h>
static inline int KREF_PUT(struct kref *kref, void (*release) (struct kref *kref))
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
int retval;
if(atomic_read(&kref->refcount) == 1)
{
}
kref_put(kref, release);
return retval;
+#else
+ return kref_put(kref, release);
+#endif // LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
}
#endif // LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9)