[staging 4/6] staging:easycap: kill EASYCAP_NEEDS_CARD_CREATE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 drivers/staging/easycap/Makefile        |    1 -
 drivers/staging/easycap/easycap_sound.c |    9 ---------
 2 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/easycap/Makefile b/drivers/staging/easycap/Makefile
index 977e153..226a779 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 2fdf4e2..d539e28 100644
--- a/drivers/staging/easycap/easycap_sound.c
+++ b/drivers/staging/easycap/easycap_sound.c
@@ -106,21 +106,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);
-- 
1.7.3.4

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux