V4L/DVB: cx18-alsa: name alsa device after the actual card
authorDevin Heitmueller <dheitmueller@kernellabs.com>
Fri, 20 Nov 2009 05:15:20 +0000 (02:15 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 26 Feb 2010 18:10:43 +0000 (15:10 -0300)
Use the cx18 board name in the ALSA description, to make it easier for users
who run "arecord -l" to see which device they should be looking for.

Also, use strlcpy() instead of strcpy().

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx18/cx18-alsa-pcm.c

index 366194068e92de9cbd51d8172977bbd7eec9e6d1..ec5851c7855d129535e3ed9a920b3efe89d10e80 100644 (file)
@@ -344,7 +344,7 @@ int snd_cx18_pcm_create(struct snd_cx18_card *cxsc)
        snd_pcm_set_ops(sp, SNDRV_PCM_STREAM_CAPTURE, &snd_cx18_pcm_capture_ops);
        sp->info_flags = 0;
        sp->private_data = cxsc;
-       strcpy(sp->name, "Conexant cx23418 Capture");
+       strlcpy(sp->name, cx->card_name, sizeof(sp->name));
 
        return 0;