summaryrefslogtreecommitdiffstats
path: root/sound/core/seq
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-02-03 17:57:16 +0100
committerTakashi Iwai <tiwai@suse.de>2015-02-03 17:57:16 +0100
commit3fe9cf390f6dc84f76b112b0a660967a84f9a81b (patch)
tree18b8573687ae8131db155aa791f4d2357d91e6c5 /sound/core/seq
parent6ccd93bdb989507717edb375d40534f1177822c5 (diff)
parent830953c0724b42be30a74febcde6c89c706ed286 (diff)
downloadtalos-obmc-linux-3fe9cf390f6dc84f76b112b0a660967a84f9a81b.tar.gz
talos-obmc-linux-3fe9cf390f6dc84f76b112b0a660967a84f9a81b.zip
Merge branch 'topic/snd-device' into for-next
Diffstat (limited to 'sound/core/seq')
-rw-r--r--sound/core/seq/seq_clientmgr.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 29182f56bfb7..48287651ac77 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -2570,6 +2570,8 @@ static const struct file_operations snd_seq_f_ops =
.compat_ioctl = snd_seq_ioctl_compat,
};
+static struct device seq_dev;
+
/*
* register sequencer device
*/
@@ -2577,12 +2579,17 @@ int __init snd_sequencer_device_init(void)
{
int err;
+ snd_device_initialize(&seq_dev, NULL);
+ dev_set_name(&seq_dev, "seq");
+
if (mutex_lock_interruptible(&register_mutex))
return -ERESTARTSYS;
- if ((err = snd_register_device(SNDRV_DEVICE_TYPE_SEQUENCER, NULL, 0,
- &snd_seq_f_ops, NULL, "seq")) < 0) {
+ err = snd_register_device(SNDRV_DEVICE_TYPE_SEQUENCER, NULL, 0,
+ &snd_seq_f_ops, NULL, &seq_dev);
+ if (err < 0) {
mutex_unlock(&register_mutex);
+ put_device(&seq_dev);
return err;
}
@@ -2598,5 +2605,6 @@ int __init snd_sequencer_device_init(void)
*/
void __exit snd_sequencer_device_done(void)
{
- snd_unregister_device(SNDRV_DEVICE_TYPE_SEQUENCER, NULL, 0);
+ snd_unregister_device(&seq_dev);
+ put_device(&seq_dev);
}
OpenPOWER on IntegriCloud