From: H Hartley Sweeten Date: Tue, 9 Apr 2013 23:32:43 +0000 (-0700) Subject: staging: comedi: unionxx5: refactor subdevice init X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~137^2~112 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dba89b14d44d463c33c3f49384475bd1316fe28a;p=pandora-kernel.git staging: comedi: unionxx5: refactor subdevice init Change the parameters passed to __unioxx5_subdev_init(), we need the comedi_device pointer to call __comedi_request_region() and the 'minor' is only used in some kernel noise so remove it. Rename the parameters 'subdev' and 'subdev_iobase' to simply 's' and 'iobase'. Use __comedi_request_region() to request the I/O region needed by the subdevice. Remove the attach noise as well as the error message when the request_region() fails, comedi_request_reqion() will output the error message if necessary. Return -ENOMEM is the kzalloc fails instead of -1. Fix unioxx5_attach() to use the new parameters to __unioxx5_subdev_init(). Pass on any error codes instead of -1. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed