From: H Hartley Sweeten Date: Thu, 18 Apr 2013 21:31:52 +0000 (-0700) Subject: staging: comedi: pcl812: use comedi_legacy_detach() X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~137^2~49 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3fd5e517aa5139a77c806a19064fd8e2976b428;p=pandora-kernel.git staging: comedi: pcl812: use comedi_legacy_detach() This driver does not follow the standard (*attach) (*detach) flow of the other drivers in comedi. Comedi drivers do not 'cleanup' any of the allocations made during the (*attach) if failures are encountered. If the (*attach) fails, the comedi core will call the (*detach) to handle any clenaup. In this driver, the function free_resources() handles all the cleanup. Remove the calls to this function during the (*attach). Since the (*detach) is then the only caller, remove the function and just put all the cleanup in the (*detach) function. Use the new comedi_legacy_detach() helper in the (*detach) to release the I/O region. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed