diff options
Diffstat (limited to 'sound/core/oss/pcm_oss.c')
-rw-r--r-- | sound/core/oss/pcm_oss.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 842c28b2ed5..bcc97075913 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c | |||
@@ -1821,6 +1821,17 @@ static int snd_pcm_oss_open_file(struct file *file, | |||
1821 | } | 1821 | } |
1822 | 1822 | ||
1823 | 1823 | ||
1824 | static int snd_task_name(struct task_struct *task, char *name, size_t size) | ||
1825 | { | ||
1826 | unsigned int idx; | ||
1827 | |||
1828 | snd_assert(task != NULL && name != NULL && size >= 2, return -EINVAL); | ||
1829 | for (idx = 0; idx < sizeof(task->comm) && idx + 1 < size; idx++) | ||
1830 | name[idx] = task->comm[idx]; | ||
1831 | name[idx] = '\0'; | ||
1832 | return 0; | ||
1833 | } | ||
1834 | |||
1824 | static int snd_pcm_oss_open(struct inode *inode, struct file *file) | 1835 | static int snd_pcm_oss_open(struct inode *inode, struct file *file) |
1825 | { | 1836 | { |
1826 | int minor = iminor(inode); | 1837 | int minor = iminor(inode); |
@@ -2446,7 +2457,8 @@ static void register_oss_dsp(snd_pcm_t *pcm, int index) | |||
2446 | if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_PCM, | 2457 | if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_PCM, |
2447 | pcm->card, index, &snd_pcm_oss_reg, | 2458 | pcm->card, index, &snd_pcm_oss_reg, |
2448 | name) < 0) { | 2459 | name) < 0) { |
2449 | snd_printk("unable to register OSS PCM device %i:%i\n", pcm->card->number, pcm->device); | 2460 | snd_printk(KERN_ERR "unable to register OSS PCM device %i:%i\n", |
2461 | pcm->card->number, pcm->device); | ||
2450 | } | 2462 | } |
2451 | } | 2463 | } |
2452 | 2464 | ||
@@ -2528,11 +2540,13 @@ static int __init alsa_pcm_oss_init(void) | |||
2528 | /* check device map table */ | 2540 | /* check device map table */ |
2529 | for (i = 0; i < SNDRV_CARDS; i++) { | 2541 | for (i = 0; i < SNDRV_CARDS; i++) { |
2530 | if (dsp_map[i] < 0 || dsp_map[i] >= SNDRV_PCM_DEVICES) { | 2542 | if (dsp_map[i] < 0 || dsp_map[i] >= SNDRV_PCM_DEVICES) { |
2531 | snd_printk("invalid dsp_map[%d] = %d\n", i, dsp_map[i]); | 2543 | snd_printk(KERN_ERR "invalid dsp_map[%d] = %d\n", |
2544 | i, dsp_map[i]); | ||
2532 | dsp_map[i] = 0; | 2545 | dsp_map[i] = 0; |
2533 | } | 2546 | } |
2534 | if (adsp_map[i] < 0 || adsp_map[i] >= SNDRV_PCM_DEVICES) { | 2547 | if (adsp_map[i] < 0 || adsp_map[i] >= SNDRV_PCM_DEVICES) { |
2535 | snd_printk("invalid adsp_map[%d] = %d\n", i, adsp_map[i]); | 2548 | snd_printk(KERN_ERR "invalid adsp_map[%d] = %d\n", |
2549 | i, adsp_map[i]); | ||
2536 | adsp_map[i] = 1; | 2550 | adsp_map[i] = 1; |
2537 | } | 2551 | } |
2538 | } | 2552 | } |