From 82753c8a0c338f489a20e0554eac589a390ac6bb Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 14 Apr 2009 11:02:14 -0300 Subject: backport commit 758021bfa9ea25c58e62d2f68512628b19502ce7 From: Mauro Carvalho Chehab Author: Takashi Iwai Date: Mon Jan 12 15:17:09 2009 +0100 drivers/media: Convert to snd_card_create() Convert from snd_card_new() to the new snd_card_create() function. While here, backport also cx231xx-audio upstream changes for using snd_card_create(). kernel-sync: Priority: normal Signed-off-by: Mauro Carvalho Chehab --- v4l/compat.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'v4l/compat.h') diff --git a/v4l/compat.h b/v4l/compat.h index 8e778d7f5..34ae08152 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -36,6 +36,10 @@ #include #endif +#ifdef NEED_SND_CARD_CREATE +#include +#endif + #ifdef NEED_ALGO_CONTROL #include #endif @@ -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 */ -- cgit v1.2.3 From 8cc78392269a77c3aed220bb457e991924480779 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 14 Apr 2009 11:27:26 -0300 Subject: compat.h: improve detection for need poll_schedule() From: Mauro Carvalho Chehab Priority: normal Signed-off-by: Mauro Carvalho Chehab --- v4l/compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'v4l/compat.h') diff --git a/v4l/compat.h b/v4l/compat.h index 34ae08152..d8bd6debe 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -427,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); \ -- cgit v1.2.3