Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit dba89b14 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8bee2dea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment