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>
Tento commit je obsažen v:
@@ -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);
|
||||
}
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele