diff options
Diffstat (limited to 'v4l/compat.h')
-rw-r--r-- | v4l/compat.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/v4l/compat.h b/v4l/compat.h index 8e778d7f5..d8bd6debe 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -36,6 +36,10 @@ #include <sound/driver.h> #endif +#ifdef NEED_SND_CARD_CREATE +#include <sound/core.h> +#endif + #ifdef NEED_ALGO_CONTROL #include <linux/i2c.h> #endif @@ -423,7 +427,7 @@ static inline int usb_endpoint_type(const struct usb_endpoint_descriptor *epd) pci_resource_len(pdev, bar)) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) +#ifdef NEED_POLL_SCHEDULE #define poll_schedule(pwq, task) \ do { \ set_current_state(task); \ @@ -432,4 +436,17 @@ static inline int usb_endpoint_type(const struct usb_endpoint_descriptor *epd) } while (0) #endif +#ifdef NEED_SND_CARD_CREATE +static inline int snd_card_create(int idx, const char *id, + struct module *module, int extra_size, + struct snd_card **card) +{ + *card = snd_card_new(idx, id, module, extra_size); + + if (*card == NULL) + return -ENOMEM; + return 0; +} #endif + +#endif /* _COMPAT_H */ |