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/hwdep.c | |
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/hwdep.c')
-rw-r--r-- | sound/core/hwdep.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c index 506387b..84244a5 100644 --- a/sound/core/hwdep.c +++ b/sound/core/hwdep.c @@ -432,10 +432,9 @@ static int snd_hwdep_dev_register(struct snd_device *device) return -EBUSY; } list_add_tail(&hwdep->list, &snd_hwdep_devices); - err = snd_register_device_for_dev(SNDRV_DEVICE_TYPE_HWDEP, - hwdep->card, hwdep->device, - &snd_hwdep_f_ops, hwdep, - &hwdep->dev, NULL, NULL); + err = snd_register_device(SNDRV_DEVICE_TYPE_HWDEP, + hwdep->card, hwdep->device, + &snd_hwdep_f_ops, hwdep, &hwdep->dev); if (err < 0) { dev_err(&hwdep->dev, "unable to register\n"); list_del(&hwdep->list); @@ -480,7 +479,7 @@ static int snd_hwdep_dev_disconnect(struct snd_device *device) if (hwdep->ossreg) snd_unregister_oss_device(hwdep->oss_type, hwdep->card, hwdep->device); #endif - snd_unregister_device(SNDRV_DEVICE_TYPE_HWDEP, hwdep->card, hwdep->device); + snd_unregister_device(&hwdep->dev); list_del_init(&hwdep->list); mutex_unlock(&hwdep->open_mutex); mutex_unlock(®ister_mutex); |