From: Levente Kurusa Date: Tue, 6 May 2014 13:57:48 +0000 (+0200) Subject: libata: clean up ZPODD when a port is detached X-Git-Tag: omap-for-v3.16/fixes-against-rc1~170^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6f9bf4d2f965b862b95213303d154e02957eed8;p=pandora-kernel.git libata: clean up ZPODD when a port is detached When a ZPODD device is unbound via sysfs, the ACPI notify handler is not removed. This causes panics as observed in Bug #74601. The panic only happens when the wake happens from outside the kernel (i.e. inserting a media or pressing a button). Add a loop to ata_port_detach which loops through the port's devices and checks if zpodd is enabled, if so call zpodd_exit. Cc: stable@vger.kernel.org Reviewed-by: Aaron Lu Signed-off-by: Levente Kurusa Signed-off-by: Tejun Heo --- Reading git-diff-tree failed