From: H Hartley Sweeten Date: Fri, 20 Jun 2014 18:10:35 +0000 (-0700) Subject: staging: comedi: mite: cleanup mite_unsetup() X-Git-Tag: omap-for-v3.17/fixes-against-rc2~166^2~1289 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b876e985c2273b7bd2d5539f2147ef69f7701129;p=pandora-kernel.git staging: comedi: mite: cleanup mite_unsetup() This function is only called by comedi drivers during the (*detach) of the driver. After it is called mite_free() is always called to kfree the allocated mite_struct pointer. Rename this function to mite_detach() and merge the kfree() from mite_free() into it. Remove the unnecessary clearing of the mite variables since the mite pointer is going to be kfree()'d anyway. The mite_detach() function checks if the pointer is valid so remove the unnecessary checks in the callers. The check can also be removed in ni_660x since the ni_660x_free_mite_rings() function does not actually need the 'mite' pointer. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed