aboutsummaryrefslogtreecommitdiff
path: root/sound/core/seq/seq_clientmgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/seq/seq_clientmgr.c')
-rw-r--r--sound/core/seq/seq_clientmgr.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index bd8c0989785..606d076f72f 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -2212,9 +2212,11 @@ static long snd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg
/* exported to kernel modules */
-int snd_seq_create_kernel_client(struct snd_card *card, int client_index)
+int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
+ const char *name_fmt, ...)
{
struct snd_seq_client *client;
+ va_list args;
snd_assert(! in_interrupt(), return -EBUSY);
@@ -2244,7 +2246,9 @@ int snd_seq_create_kernel_client(struct snd_card *card, int client_index)
client->accept_input = 1;
client->accept_output = 1;
- sprintf(client->name, "Client-%d", client->number);
+ va_start(args, name_fmt);
+ vsnprintf(client->name, sizeof(client->name), name_fmt, args);
+ va_end(args);
client->type = KERNEL_CLIENT;
up(&register_mutex);