summaryrefslogtreecommitdiff
path: root/linux/include/media/saa7146.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux/include/media/saa7146.h')
-rw-r--r--linux/include/media/saa7146.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/linux/include/media/saa7146.h b/linux/include/media/saa7146.h
index ef7271db6..2e85e7b19 100644
--- a/linux/include/media/saa7146.h
+++ b/linux/include/media/saa7146.h
@@ -15,9 +15,21 @@
#include <linux/vmalloc.h> /* for vmalloc() */
#include <linux/mm.h> /* for vmalloc_to_page() */
-/* ugly, but necessary to build the dvb stuff under 2.4. */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51)
- #include "dvb_functions.h"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+static inline
+int try_module_get(struct module *mod)
+{
+ if (!MOD_CAN_QUERY(mod))
+ return 0;
+ __MOD_INC_USE_COUNT(mod);
+ return 1;
+}
+
+#define module_put(mod) __MOD_DEC_USE_COUNT(mod)
+#define iminor(xx) minor(xx->i_rdev)
+#define strlcpy strncpy
+#define i2c_get_adapdata(adapter) (struct saa7146_dev*)adapter->data;
+
#endif
#define SAA7146_VERSION_CODE KERNEL_VERSION(0,5,0)