hpsa: refactor duplicated scan completion code into a new routine
hpsa: refactor duplicated scan completion code into a new routine

Hoist the conditional out of do_not_scan_if_controller_locked_up() and
place it in the caller (this improves the code structure, making it
more consistent with other uses and enabling tail-call optimization);
rename the function to hpsa_scan_complete(), and use it at the end of
hpsa_scan_start() as well.

Reviewed-by: Scott Teel <a7e0ce414fba0c6a771cbc0f20d6d2c5203e64ca@pmcs.com>
Signed-off-by: Webb Scales <37ccb0fc6f308d8cc09a009b4a31ce019f4bec5c@hp.com>
Signed-off-by: Don Brace <2492869e79b95109d0bee0fc4e8bb0141c1888c7@pmcs.com>
Signed-off-by: Christoph Hellwig <923f7720577207a44b32e59bbfbea59d27f1ae8e@lst.de>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs