diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-04 14:36:11 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-25 15:12:52 +0400 |
commit | 72620d6048445bda3f748c97fb2f18e47b19a9e5 (patch) | |
tree | d477ad2c4ade6b2d3c1ef2d37aa555ec8c1ac137 /sound/core/init.c | |
parent | 289ca025ee1d78223e3368801fc2b984e5efbfc7 (diff) | |
download | linux-72620d6048445bda3f748c97fb2f18e47b19a9e5.tar.xz |
ALSA: Clean up snd_device_*() codes
A few code cleanups and optimizations. In addition, drop
snd_device_disconnect() that isn't used at all, and drop the return
values from snd_device_free*().
Another slight difference by this change is that now the device state
will become always SNDRV_DEV_REGISTERED no matter whether dev_register
ops is present or not. It's for better consistency. There should be
no impact for the current tree, as the state isn't checked.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/init.c')
-rw-r--r-- | sound/core/init.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/core/init.c b/sound/core/init.c index 9e7f17b72fb6..5ee83845c5de 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -454,10 +454,7 @@ static int snd_card_do_free(struct snd_card *card) if (snd_mixer_oss_notify_callback) snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE); #endif - if (snd_device_free_all(card) < 0) { - dev_err(card->dev, "unable to free all devices\n"); - /* Fatal, but this situation should never occur */ - } + snd_device_free_all(card); if (card->private_free) card->private_free(card); snd_info_free_entry(card->proc_id); |