Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354342
b: refs/heads/master
c: da71751
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Feb 4, 2013
1 parent f6b7d24 commit dfa6324
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f65cc5447eaea9f7be1ff54e27c9658a66c5910f
refs/heads/master: da71751177f35f0ca5494968cc237511c423a744
9 changes: 1 addition & 8 deletions trunk/drivers/staging/comedi/comedidev.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/staging/comedi/drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@

struct comedi_driver *comedi_drivers;

int 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);
return 0;
}
EXPORT_SYMBOL_GPL(comedi_set_hw_dev);

int comedi_alloc_subdevices(struct comedi_device *dev, int num_subdevices)
{
struct comedi_subdevice *s;
Expand Down

0 comments on commit dfa6324

Please sign in to comment.