diff options
Diffstat (limited to 'sound/pci/ctxfi/ctpcm.c')
-rw-r--r-- | sound/pci/ctxfi/ctpcm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/pci/ctxfi/ctpcm.c b/sound/pci/ctxfi/ctpcm.c index a64cb0ed8759..756d8b2776b3 100644 --- a/sound/pci/ctxfi/ctpcm.c +++ b/sound/pci/ctxfi/ctpcm.c | |||
@@ -469,12 +469,10 @@ int ct_alsa_pcm_create(struct ct_atc *atc, | |||
469 | struct snd_pcm *pcm; | 469 | struct snd_pcm *pcm; |
470 | int err; | 470 | int err; |
471 | int playback_count, capture_count; | 471 | int playback_count, capture_count; |
472 | char name[128]; | ||
473 | 472 | ||
474 | strncpy(name, device_name, sizeof(name)); | ||
475 | playback_count = (IEC958 == device) ? 1 : 8; | 473 | playback_count = (IEC958 == device) ? 1 : 8; |
476 | capture_count = (FRONT == device) ? 1 : 0; | 474 | capture_count = (FRONT == device) ? 1 : 0; |
477 | err = snd_pcm_new(atc->card, name, device, | 475 | err = snd_pcm_new(atc->card, "ctxfi", device, |
478 | playback_count, capture_count, &pcm); | 476 | playback_count, capture_count, &pcm); |
479 | if (err < 0) { | 477 | if (err < 0) { |
480 | printk(KERN_ERR "ctxfi: snd_pcm_new failed!! Err=%d\n", err); | 478 | printk(KERN_ERR "ctxfi: snd_pcm_new failed!! Err=%d\n", err); |
@@ -484,7 +482,7 @@ int ct_alsa_pcm_create(struct ct_atc *atc, | |||
484 | pcm->private_data = atc; | 482 | pcm->private_data = atc; |
485 | pcm->info_flags = 0; | 483 | pcm->info_flags = 0; |
486 | pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; | 484 | pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; |
487 | strcpy(pcm->name, device_name); | 485 | strlcpy(pcm->name, device_name, sizeof(pcm->name)); |
488 | 486 | ||
489 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &ct_pcm_playback_ops); | 487 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &ct_pcm_playback_ops); |
490 | 488 | ||