[RFC PATCH 0/2] iio: kfifo: Add resource management alloc/free

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is RFC because I felt a bit confused while devm_alloc/free adding.
It applies on next but I've tested it partialy on 3.16.  It can cause some
problemsi with several drivers so it does not fit for now. 

iio kfifo alloc takes one argument struct iio_dev * which is not used.
iio_buffer is attached by external function.  In such situation resource 
management alloc can be implemented in two ways:
1. indio_dev ptr in iio_kfifo_alloc stays and devm_ functions have to
provide it but it is still unused.
2.  As there are a few drivers which use kfifo it can be removed and 
iio_kfifo_allocate refactored.

I apologise if I missed something and it was done in such way intentionally.



Karol Wrona (2):
  iio: kfifo: Remove unused argument in iio_kfifo_allocate
  iio: kfifo: Add resource management devm_iio_kfifo_allocate/free

 drivers/iio/kfifo_buf.c       |   58 ++++++++++++++++++++++++++++++++++++++++-
 include/linux/iio/kfifo_buf.h |    5 +++-
 2 files changed, 61 insertions(+), 2 deletions(-)

-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux