From: Tomas Winkler Date: Tue, 18 Jan 2011 22:24:09 +0000 (+0200) Subject: staging: easycap: kill EASYCAP_NEEDS_CARD_CREATE X-Git-Tag: MMI-PSA29.97-13-9~20521^2~838 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5a858078942a6cb75f1d3ac44e8077bc228f32a8;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/easycap/Makefile b/drivers/staging/easycap/Makefile index 977e1535667d..226a7795a1db 100644 --- a/drivers/staging/easycap/Makefile +++ b/drivers/staging/easycap/Makefile @@ -9,5 +9,4 @@ ccflags-y += -DEASYCAP_NEEDS_V4L2_DEVICE_H ccflags-y += -DEASYCAP_NEEDS_V4L2_FOPS ccflags-y += -DEASYCAP_NEEDS_UNLOCKED_IOCTL ccflags-y += -DEASYCAP_NEEDS_ALSA -ccflags-y += -DEASYCAP_NEEDS_CARD_CREATE diff --git a/drivers/staging/easycap/easycap_sound.c b/drivers/staging/easycap/easycap_sound.c index 8d1c0620344d..4bfaf06fb32a 100644 --- a/drivers/staging/easycap/easycap_sound.c +++ b/drivers/staging/easycap/easycap_sound.c @@ -107,21 +107,12 @@ if (true == peasycap->microphone) { peasycap->alsa_hardware.rate_max = 48000; } -#if defined(EASYCAP_NEEDS_CARD_CREATE) if (0 != snd_card_create(SNDRV_DEFAULT_IDX1, "easycap_alsa", THIS_MODULE, 0, &psnd_card)) { SAY("ERROR: Cannot do ALSA snd_card_create()\n"); 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); strcpy(&psnd_card->driver[0], EASYCAP_DRIVER_DESCRIPTION);