diff options
Diffstat (limited to 'v4l')
-rw-r--r-- | v4l/ChangeLog | 8 | ||||
-rw-r--r-- | v4l/compat.h | 13 |
2 files changed, 20 insertions, 1 deletions
diff --git a/v4l/ChangeLog b/v4l/ChangeLog index e121fa912..4bcdc1039 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,3 +1,11 @@ +2005-10-20 20:11 nshmyrev + + * ../v4l/compat.h: + + - Fix kcalloc error with kernel < 2.6.9. + + Signed-off-by: Nickolay V. Shmyrev <<nshmyrev@yandex.ru>> + 2005-10-20 20:00 mchehab * ../v4l/scripts/gentree.pl: diff --git a/v4l/compat.h b/v4l/compat.h index 46f3ec822..be421393c 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -1,5 +1,5 @@ /* - * $Id: compat.h,v 1.26 2005/10/20 19:27:46 nsh Exp $ + * $Id: compat.h,v 1.27 2005/10/20 20:11:39 nsh Exp $ */ #ifndef _COMPAT_H @@ -217,6 +217,17 @@ static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr) #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) +#define kcalloc(n,size,flags) \ +({ \ + void * __ret = NULL; \ + __ret = kmalloc(n * size, flags); \ + if (__ret) \ + memset(__ret, 0, n * size); \ + __ret; \ +}) +#endif + #endif /* * Local variables: |