[ALSA] Make snd_task_name() module local
Modules: ALSA Core,ALSA<-OSS emulation Remove a global function snd_task_name(), and move it local to snd-pcm-oss module. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
committed by
Jaroslav Kysela
parent
07799e756c
commit
93f2e37840
@@ -1821,6 +1821,17 @@ static int snd_pcm_oss_open_file(struct file *file,
|
||||
}
|
||||
|
||||
|
||||
static int snd_task_name(struct task_struct *task, char *name, size_t size)
|
||||
{
|
||||
unsigned int idx;
|
||||
|
||||
snd_assert(task != NULL && name != NULL && size >= 2, return -EINVAL);
|
||||
for (idx = 0; idx < sizeof(task->comm) && idx + 1 < size; idx++)
|
||||
name[idx] = task->comm[idx];
|
||||
name[idx] = '\0';
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_pcm_oss_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
int minor = iminor(inode);
|
||||
|
Reference in New Issue
Block a user