Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354264
b: refs/heads/master
c: bc3954b
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Jan 30, 2013
1 parent 02d5b08 commit 502bed4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 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: 104640606be0df6bcdb5ec7960a9c3c1278117ae
refs/heads/master: bc3954b8147402e4495378d982cc8e708703a0f1
21 changes: 10 additions & 11 deletions trunk/drivers/staging/comedi/comedidev.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,20 +429,19 @@ static inline unsigned int bytes_per_sample(const struct comedi_subdevice *subd)
return sizeof(short);
}

/* must be used in attach to set dev->hw_dev if you wish to dma directly
into comedi's buffer */
/*
* Must set dev->hw_dev if you wish to dma directly into comedi's buffer.
* Also useful for retrieving a previously configured hardware device of
* 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)
{
if (dev->hw_dev == hw_dev)
return;
if (dev->hw_dev)
put_device(dev->hw_dev);
dev->hw_dev = hw_dev;
if (dev->hw_dev) {
dev->hw_dev = get_device(dev->hw_dev);
BUG_ON(dev->hw_dev == NULL);
}
struct device *old_hw_dev = dev->hw_dev;

dev->hw_dev = get_device(hw_dev);
put_device(old_hw_dev);
}

static inline struct pci_dev *comedi_to_pci_dev(struct comedi_device *dev)
Expand Down

0 comments on commit 502bed4

Please sign in to comment.