staging: iio: ad5933: attach life-cycle of kfifo buffer to parent device and use...
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Fri, 8 May 2020 14:39:35 +0000 (17:39 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 11 May 2020 19:19:19 +0000 (20:19 +0100)
commitda7de29bb1716c96cab1566d845e434848604be4
tree41fe70fcfbaa962c4278d3ac97e6e57184c9f5bd
parentdee2dabc0e4115b80945fe2c91603e634f4b4686
staging: iio: ad5933: attach life-cycle of kfifo buffer to parent device and use managed calls throughout

This change makes the use of devm_iio_kfifo_allocate() to attach the
life-cycle of the kfifo buffer to the parent (client->dev) object.

This removes the need to explicitly free 'indio_dev->buffer' via
iio_kfifo_free(), which is the main intent.

Having done this, it is straight forward to move to devm_ calls throughout
and drop the remove function.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/impedance-analyzer/ad5933.c