Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317191
b: refs/heads/master
c: e4e8b77
h: refs/heads/master
i:
  317189: 28390ce
  317187: 5154a36
  317183: 4374de8
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Greg Kroah-Hartman committed Jun 5, 2012
1 parent 408ec38 commit 25ef8d8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 44dd5b02530a5aaea16c1a0a9eea377407445b4a
refs/heads/master: e4e8b7765867e8f4705bcc18b8930edbe0e4ef3c
11 changes: 11 additions & 0 deletions trunk/include/linux/iio/iio.h
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,17 @@ static inline struct iio_dev *dev_to_iio_dev(struct device *dev)
return container_of(dev, struct iio_dev, dev);
}

/**
* iio_device_get() - increment reference count for the device
* @indio_dev: IIO device structure
*
* Returns: The passed IIO device
**/
static inline struct iio_dev *iio_device_get(struct iio_dev *indio_dev)
{
return indio_dev ? dev_to_iio_dev(get_device(&indio_dev->dev)) : NULL;
}

/* Can we make this smaller? */
#define IIO_ALIGN L1_CACHE_BYTES
/**
Expand Down

0 comments on commit 25ef8d8

Please sign in to comment.