]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
staging: comedi: change comedi_alloc_board_minor() to return pointer
authorIan Abbott <abbotti@mev.co.uk>
Thu, 4 Apr 2013 13:58:50 +0000 (14:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 21:33:17 +0000 (14:33 -0700)
commit7638ffcb50903d9ddbf605c7e9578d72658a960a
tree1c1372fff0a1091330af45e1570e92f08fc88bf1
parent70f30c3771f1e7c55d381954d84beff9c257a2b6
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>
drivers/staging/comedi/comedi_fops.c
drivers/staging/comedi/comedi_internal.h
drivers/staging/comedi/drivers.c