Commit 5a858078 authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

staging: easycap: kill EASYCAP_NEEDS_CARD_CREATE

for in-tree driver we can use snd_card_create
for backports to older kernels this can be easily wrapped
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1dc6e418
...@@ -9,5 +9,4 @@ ccflags-y += -DEASYCAP_NEEDS_V4L2_DEVICE_H ...@@ -9,5 +9,4 @@ ccflags-y += -DEASYCAP_NEEDS_V4L2_DEVICE_H
ccflags-y += -DEASYCAP_NEEDS_V4L2_FOPS ccflags-y += -DEASYCAP_NEEDS_V4L2_FOPS
ccflags-y += -DEASYCAP_NEEDS_UNLOCKED_IOCTL ccflags-y += -DEASYCAP_NEEDS_UNLOCKED_IOCTL
ccflags-y += -DEASYCAP_NEEDS_ALSA ccflags-y += -DEASYCAP_NEEDS_ALSA
ccflags-y += -DEASYCAP_NEEDS_CARD_CREATE
...@@ -107,21 +107,12 @@ if (true == peasycap->microphone) { ...@@ -107,21 +107,12 @@ if (true == peasycap->microphone) {
peasycap->alsa_hardware.rate_max = 48000; peasycap->alsa_hardware.rate_max = 48000;
} }
#if defined(EASYCAP_NEEDS_CARD_CREATE)
if (0 != snd_card_create(SNDRV_DEFAULT_IDX1, "easycap_alsa", if (0 != snd_card_create(SNDRV_DEFAULT_IDX1, "easycap_alsa",
THIS_MODULE, 0, THIS_MODULE, 0,
&psnd_card)) { &psnd_card)) {
SAY("ERROR: Cannot do ALSA snd_card_create()\n"); SAY("ERROR: Cannot do ALSA snd_card_create()\n");
return -EFAULT; return -EFAULT;
} }
#else
psnd_card = snd_card_new(SNDRV_DEFAULT_IDX1, "easycap_alsa",
THIS_MODULE, 0);
if (NULL == psnd_card) {
SAY("ERROR: Cannot do ALSA snd_card_new()\n");
return -EFAULT;
}
#endif /*EASYCAP_NEEDS_CARD_CREATE*/
sprintf(&psnd_card->id[0], "EasyALSA%i", peasycap->minor); sprintf(&psnd_card->id[0], "EasyALSA%i", peasycap->minor);
strcpy(&psnd_card->driver[0], EASYCAP_DRIVER_DESCRIPTION); strcpy(&psnd_card->driver[0], EASYCAP_DRIVER_DESCRIPTION);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment