summaryrefslogtreecommitdiff
path: root/v4l/compat.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-04 14:31:12 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-11-04 14:31:12 -0200
commit87a688a17ae8f82d48dd8833ed0eb29ecba1183c (patch)
treec65044f2d92ddab4fdb8d56bfda831307bde74a8 /v4l/compat.h
parent09569d7cdf845441f5d37be1a42c1ef0fe84a61d (diff)
parent1dbbdee4213114f49f8fe0d92a6daeba5c6f639f (diff)
downloadmediapointer-dvb-s2-87a688a17ae8f82d48dd8833ed0eb29ecba1183c.tar.gz
mediapointer-dvb-s2-87a688a17ae8f82d48dd8833ed0eb29ecba1183c.tar.bz2
merge: http://linuxtv.org/hg/~mkrufky/tda8295
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/compat.h')
-rw-r--r--v4l/compat.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index db45d91f0..e4877e865 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -462,6 +462,27 @@ static inline unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate)
}
#endif
+#ifndef task_pid_nr
+# define task_pid_nr(current) ((current)->pid)
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+# define sg_init_table(a,b)
+# define sg_page(p) (sg->page)
+# define sg_set_page(sglist,pg,sz,off) \
+do { \
+ struct scatterlist *p=sglist; \
+ p->page = pg; \
+ p->length = sz; \
+ p->offset = off; \
+} while (0)
+#endif
+
+#ifndef BIT_MASK
+# define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
+# define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
+#endif
+
#endif
/*
* Local variables: