staging: easycap: kill EASYCAP_NEEDS_CARD_CREATE
authorTomas Winkler <tomas.winkler@intel.com>
Tue, 18 Jan 2011 22:24:09 +0000 (00:24 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 21 Jan 2011 20:29:43 +0000 (12:29 -0800)
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 <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/easycap/Makefile
drivers/staging/easycap/easycap_sound.c

index 977e1535667d8f04d415bf46c29f1a51045595f9..226a7795a1db29af5d586f6d40a7d180791c68c8 100644 (file)
@@ -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
 
index 8d1c0620344dc411aca73a801401657b9d18ceae..4bfaf06fb32a60948b5632aab8f97adaec1292e5 100644 (file)
@@ -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);