On Friday, February 01, 2013 6:23 AM, Ian Abbott wrote: > 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@xxxxxxxxx> > --- > drivers/staging/comedi/comedidev.h | 9 +-------- > drivers/staging/comedi/drivers.c | 10 ++++++++++ > 2 files changed, 11 insertions(+), 8 deletions(-) > > diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h > index f4541ae..33207fb 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); Minor nitpick... The variable names are not needed in the prototype of a function in a header. Either way, for both patches... Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers> _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel