diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2012-12-19 15:34:40 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-07 14:25:46 -0800 |
commit | 85104e9b409013c78624b367dec02e6ccc996635 (patch) | |
tree | 60e4bdb4ecfa319df2a80625a0de7397d196e7fa /drivers/staging/comedi/comedidev.h | |
parent | 43bd33f22444868cbc9d4cbec7a3efb0a7c2cb25 (diff) |
staging: comedi: comedi_fops: introduce comedi_dev_from_minor()
A number of functions have to call comedi_get_device_file_info()
to get the comedi_device_file_info pointer for a given minor. That
pointer is only used to get the actual comedi_device pointer for
the minor.
Introduce a new helper function, comedi_dev_from_minor(), to simplify
this operation. This will also allow us to make the comedi_device_file_info
struct private.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedidev.h')
-rw-r--r-- | drivers/staging/comedi/comedidev.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h index a2123ae7daba..fc2c17925381 100644 --- a/drivers/staging/comedi/comedidev.h +++ b/drivers/staging/comedi/comedidev.h @@ -282,6 +282,8 @@ static const unsigned COMEDI_SUBDEVICE_MINOR_OFFSET = 1; struct comedi_device_file_info *comedi_get_device_file_info(unsigned minor); +struct comedi_device *comedi_dev_from_minor(unsigned minor); + int comedi_alloc_subdevices(struct comedi_device *, int); void comedi_device_detach(struct comedi_device *dev); |