From: Lars-Peter Clausen Date: Mon, 10 Nov 2014 21:41:45 +0000 (+0100) Subject: ASoC: Properly handle AC'97 device lifetime management X-Git-Tag: omap-for-v3.19/fixes-rc1~126^2~20^2~23^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70f3af3ca15affaef3d026a5aa6e44c4627ea6c7;p=pandora-kernel.git ASoC: Properly handle AC'97 device lifetime management The memory that a struct device is contained in must not be freed except from within the device's release callback. The ASoC code currently does not adhere to this rule for the AC'97 device. This patch fixes it by moving the freeing of the AC'97 to the release callback and splitting up the registration and unregistration of the device into separate steps for getting/putting the reference to the device and adding/removing it to the device hierarchy. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- Reading git-diff-tree failed