summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/comedidev.h
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2013-02-01 13:23:19 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-02-03 17:44:19 -0800
commitda71751177f35f0ca5494968cc237511c423a744 (patch)
tree139fcfc6582834a879ce0a5c4845c16201c1b459 /drivers/staging/comedi/comedidev.h
parentf65cc5447eaea9f7be1ff54e27c9658a66c5910f (diff)
staging: comedi: export comedi_set_hw_dev()
Chnage the inline `comedi_set_hw_dev()` to an exported function and change it's return type from `void` to `int` so we can impose some restrictions (in a later patch) and return an error if necessary. Only a few comedi drivers call this, although they don't need to if the hardware device has been attached automatically via `comedi_auto_config()` and the comedi driver's `auto_attach()` method. Signed-off-by: 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.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 484321d546dd..1502fc4a85fc 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -324,14 +324,7 @@ static inline unsigned int bytes_per_sample(const struct comedi_subdevice *subd)
* known bus type. Set automatically for auto-configured devices.
* Automatically set to NULL when detaching hardware device.
*/
-static inline void comedi_set_hw_dev(struct comedi_device *dev,
- struct device *hw_dev)
-{
- struct device *old_hw_dev = dev->hw_dev;
-
- dev->hw_dev = get_device(hw_dev);
- put_device(old_hw_dev);
-}
+int comedi_set_hw_dev(struct comedi_device *dev, struct device *hw_dev);
unsigned int comedi_buf_write_alloc(struct comedi_async *, unsigned int);
unsigned int comedi_buf_write_free(struct comedi_async *, unsigned int);