From 40a4b263854346fe7c7d1c3964c106296f690816 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 30 Jan 2015 08:34:58 +0100 Subject: 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 Signed-off-by: Takashi Iwai --- sound/core/control.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sound/core/control.c') diff --git a/sound/core/control.c b/sound/core/control.c index e214fabbc671..60caba1f2211 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -1661,9 +1661,8 @@ static int snd_ctl_dev_register(struct snd_device *device) { struct snd_card *card = device->device_data; - return snd_register_device_for_dev(SNDRV_DEVICE_TYPE_CONTROL, card, - -1, &snd_ctl_f_ops, card, - &card->ctl_dev, NULL, NULL); + return snd_register_device(SNDRV_DEVICE_TYPE_CONTROL, card, -1, + &snd_ctl_f_ops, card, &card->ctl_dev); } /* @@ -1681,7 +1680,7 @@ static int snd_ctl_dev_disconnect(struct snd_device *device) } read_unlock(&card->ctl_files_rwlock); - return snd_unregister_device(SNDRV_DEVICE_TYPE_CONTROL, card, -1); + return snd_unregister_device(&card->ctl_dev); } /* -- cgit v1.2.1