OSDN Git Service

ALSA: core: Fix missing card sysfs contents
authorTakashi Iwai <tiwai@suse.de>
Wed, 19 Feb 2014 10:18:10 +0000 (11:18 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 19 Feb 2014 10:20:32 +0000 (11:20 +0100)
commitb203dbab0838afa4b2de8b5bd880fb124446b764
tree02a8fc1f6f0323b6aa04fb1f4d944dca10a03e84
parentdff86f86d43f17db8616d06f4150c8957d33864b
ALSA: core: Fix missing card sysfs contents

While moving the card device into struct snd_card, the reference to
the assigned card in sysfs show/store callbacks were forgotten to be
refreshed, still accessing to the no longer used drvdata.  Fix these
places to refer correctly via container_of().

Also, remove the superfluous NULL checks since it's guaranteed to be
non-NULL now.

Fixes: 8bfb181c17d2 ('ALSA: Embed card device into struct snd_card')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/init.c