diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-01-30 08:34:58 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-02-02 17:01:26 +0100 |
commit | 40a4b263854346fe7c7d1c3964c106296f690816 (patch) | |
tree | 409291460a651df9ef508f19667489a25f5df09e /sound/core/seq | |
parent | 04c5d5a430fca046cffac099a3f41e74816939da (diff) | |
download | op-kernel-dev-40a4b263854346fe7c7d1c3964c106296f690816.zip op-kernel-dev-40a4b263854346fe7c7d1c3964c106296f690816.tar.gz |
ALSA: Simplify snd_device_register() variants
Now that all callers have been replaced with
snd_device_register_for_dev(), let's drop the obsolete device
registration code and concentrate only on the code handling struct
device directly. That said,
- remove the old snd_device_register(),
- rename snd_device_register_for_dev() with snd_device_register(),
- drop superfluous arguments from snd_device_register(),
- change snd_unregister_device() to pass the device pointer directly
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/seq')
-rw-r--r-- | sound/core/seq/seq_clientmgr.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index 65b320e..2b62cd0 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -2586,9 +2586,8 @@ int __init snd_sequencer_device_init(void) if (mutex_lock_interruptible(®ister_mutex)) return -ERESTARTSYS; - err = snd_register_device_for_dev(SNDRV_DEVICE_TYPE_SEQUENCER, NULL, 0, - &snd_seq_f_ops, NULL, - &seq_dev, NULL, NULL); + err = snd_register_device(SNDRV_DEVICE_TYPE_SEQUENCER, NULL, 0, + &snd_seq_f_ops, NULL, &seq_dev); if (err < 0) { mutex_unlock(®ister_mutex); put_device(&seq_dev); @@ -2607,6 +2606,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); } |