diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 10:53:33 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 10:53:33 -0200 |
commit | a3161d36fb129719b87ecb7ab6ba93fbcb0eeb39 (patch) | |
tree | 8160c72ffdc2f839d64c7dbdebfb89f494243b63 /v4l | |
parent | 736492eec82251fc8d5cc1a25567c9b4ca170eee (diff) | |
download | mediapointer-dvb-s2-a3161d36fb129719b87ecb7ab6ba93fbcb0eeb39.tar.gz mediapointer-dvb-s2-a3161d36fb129719b87ecb7ab6ba93fbcb0eeb39.tar.bz2 |
Fix build breakage with kernels lower than 2.6.28
From: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch fixes compilation for older kernels. However, due to -alsa
changes on saa7134-alsa and snd-bt878, I'm not sure if this is enough
for it to really work.
I suspect that something else may be needed for they to work with
earlier versions.
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l')
-rw-r--r-- | v4l/compat.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/v4l/compat.h b/v4l/compat.h index 6e90c0e63..0e2ccd7a9 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -237,4 +237,17 @@ static inline int list_is_singular(const struct list_head *head) #define current_uid() (current->uid) #endif +#ifndef WARN +#define WARN(condition, format...) ({ \ + int __ret_warn_on = !!(condition); \ + if (unlikely(__ret_warn_on)) \ + printk(KERN_WARNING format); \ + unlikely(__ret_warn_on); \ +}) +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28) +#define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond)) +#endif + #endif |