From: Takashi Iwai Date: Tue, 16 Oct 2012 11:05:59 +0000 (+0200) Subject: ALSA: Add a reference counter to card instance X-Git-Tag: v3.2.34~72 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b4a36722e5e518e4bdd3a215d8a1c5adc18e911;p=pandora-kernel.git ALSA: Add a reference counter to card instance commit a0830dbd4e42b38aefdf3fb61ba5019a1a99ea85 upstream. For more strict protection for wild disconnections, a refcount is introduced to the card instance, and let it up/down when an object is referred via snd_lookup_*() in the open ops. The free-after-last-close check is also changed to check this refcount instead of the empty list, too. Reported-by: Matthieu CASTET Signed-off-by: Takashi Iwai Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed