From: Richard MUSIL Date: Wed, 6 Feb 2008 09:37:02 +0000 (-0800) Subject: tpm.c: fix crash during device removal X-Git-Tag: v2.6.25-rc1~727 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bd91f18be2fc0dd0384fbfca6d3cdd79a8050dd;p=pandora-kernel.git tpm.c: fix crash during device removal The clean up procedure now uses platform device "release" callback to handle memory clean up. For this purpose "release" function callback was added to struct tpm_vendor_specific, so hw device driver provider can get called when it is safe to remove all allocated resources. This is supposed to fix a bug in device removal, where device while in receive function (waiting on timeout) was prone to segfault, if the tpm_chip struct was unallocated before the timeout expired (in tpm_remove_hardware). Acked-by: Marcel Selhorst Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed