diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2013-04-04 14:58:50 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-05 14:33:17 -0700 |
commit | 7638ffcb50903d9ddbf605c7e9578d72658a960a (patch) | |
tree | 1c1372fff0a1091330af45e1570e92f08fc88bf1 /drivers/staging/comedi/comedi_internal.h | |
parent | 70f30c3771f1e7c55d381954d84beff9c257a2b6 (diff) |
staging: comedi: change comedi_alloc_board_minor() to return pointer
Change `comedi_alloc_board_minor()` to return a pointer to the allocated
`struct comedi_device` instead of a minor device number. Return an
`ERR_PTR()` value on error instead of a negative error number. This
saves a call to `comedi_dev_from_minor()` in `comedi_auto_config()`.
Also change it to use a local variable `dev` to hold the pointer to the
`struct comedi_device` instead of using `info->device` all the time.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi_internal.h')
-rw-r--r-- | drivers/staging/comedi/comedi_internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/comedi_internal.h b/drivers/staging/comedi/comedi_internal.h index 05e9e6d951d0..d5e03e558b35 100644 --- a/drivers/staging/comedi/comedi_internal.h +++ b/drivers/staging/comedi/comedi_internal.h @@ -8,7 +8,7 @@ */ int do_rangeinfo_ioctl(struct comedi_device *dev, struct comedi_rangeinfo __user *arg); -int comedi_alloc_board_minor(struct device *hardware_device); +struct comedi_device *comedi_alloc_board_minor(struct device *hardware_device); void comedi_release_hardware_device(struct device *hardware_device); int comedi_alloc_subdevice_minor(struct comedi_subdevice *s); void comedi_free_subdevice_minor(struct comedi_subdevice *s); |