Skip to content

Commit

Permalink
staging: easycap: kill EASYCAP_NEEDS_CARD_CREATE
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Jan 21, 2011
1 parent 1dc6e41 commit 5a85807
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion drivers/staging/easycap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

9 changes: 0 additions & 9 deletions drivers/staging/easycap/easycap_sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5a85807

Please sign in to comment.