From: Hauke Mehrtens Date: Sat, 22 Feb 2014 20:42:07 +0000 (+0100) Subject: backports: add snd_card_new() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1675a771ab6578bbd766de27fcda51129d5a559a;p=openwrt%2Fstaging%2Fblogic.git backports: add snd_card_new() This is needed by drivers/media/pci/cx18/cx18-alsa-main.c Signed-off-by: Hauke Mehrtens --- diff --git a/backport/backport-include/sound/core.h b/backport/backport-include/sound/core.h new file mode 100644 index 000000000000..beb89353538e --- /dev/null +++ b/backport/backport-include/sound/core.h @@ -0,0 +1,20 @@ +#ifndef _BACKPORT_SOUND_CORE_H +#define _BACKPORT_SOUND_CORE_H +#include_next + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) +#define snd_card_new LINUX_BACKPORT(snd_card_new) +static inline +int snd_card_new(struct device *parent, int idx, const char *xid, + struct module *module, int extra_size, + struct snd_card **card_ret) +{ + int ret; + + ret = snd_card_create(idx, xid, module, extra_size, card_ret); + snd_card_set_dev(*card_ret, parent); + return ret; +} +#endif + +#endif /* _BACKPORT_SOUND_CORE_H */