From: Kei Tokunaga Date: Mon, 15 Mar 2010 05:48:43 +0000 (+0900) Subject: [SCSI] mpt: modify mptctl_exit() to call proper deregister functions X-Git-Tag: v2.6.35-rc1~470^2^2~151 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65c054f235fda2d545ecd2a7948906a3cf0c1f39;p=pandora-kernel.git [SCSI] mpt: modify mptctl_exit() to call proper deregister functions This patch fixes some issues of mptctl_exit(). 1) It doesn't call mpt_deregister() for mptctl_taskmgmt_id => Insmoding/rmmoding mptctl.ko repeadtedly (up to MPT_MAX_PROTOCOL_DRIVERS-1 at most) can eat up all cb_idx, and that would cause a lack of MptCallbacks[], MptDriverClass[], and MptEvHandlers[]. 2) It doesn't call mpt_event_deregister() for mptctl_id => Need to call it. 3) It calls mpt_reset_deregister() for mptctl_taskmgmt_id => This could accidentally deregister an innocent reset handler that you don't want to. This patch also adds a check for mptctl_taskmgmt_id. Signed-off-by: Kei Tokunaga Acked-by: "Desai, Kashyap" Signed-off-by: James Bottomley --- Reading git-diff-tree failed