iio: Add refcount and buffer poll wakeup
authorSpencer Sutterlin <ssutterlin@nvidia.com>
Wed, 30 Nov 2016 20:31:23 +0000 (12:31 -0800)
committermobile promotions <svcmobile_promotions@nvidia.com>
Tue, 6 Dec 2016 04:03:21 +0000 (20:03 -0800)
commit799544dad77cb795b0bca3d3a3a91d734ad698fb
tree86b04646177767fd1c3074c0623d6041d65de34d
parenta817394623970ff1ddcf79dff56145b3cc826e32
iio: Add refcount and buffer poll wakeup

Bring ideas from the following upstream commits
- commit "cadc2125e" (iio: fix: Keep a reference to the IIO device
  for open file descriptors)
- commit "d2f0a48f3" (iio: Wakeup poll and blocking reads when the
  device is unregistered)

Bug 200254499

Change-Id: If5f9275091ae3f86f5c2994af5a619797b9425f0
Signed-off-by: Spencer Sutterlin <ssutterlin@nvidia.com>
Reviewed-on: http://git-master/r/1263974
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>
drivers/iio/iio_core.h
drivers/iio/industrialio-buffer.c
drivers/iio/industrialio-core.c