Skip to content

Commit 608d98a

Browse files
commodoJonathan Cameron
authored andcommitted
iio: buffer: drop devm_iio_kfifo_free() API call
It's unused so far, so it can be removed. Also makes sense to remove it to discourage weird uses of this call during review. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 05c09e3 commit 608d98a

3 files changed

Lines changed: 0 additions & 24 deletions

File tree

‎Documentation/driver-api/driver-model/devres.rst‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ IIO
286286
devm_iio_device_alloc()
287287
devm_iio_device_register()
288288
devm_iio_kfifo_allocate()
289-
devm_iio_kfifo_free()
290289
devm_iio_triggered_buffer_setup()
291290
devm_iio_trigger_alloc()
292291
devm_iio_trigger_register()

‎drivers/iio/buffer/kfifo_buf.c‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -179,16 +179,6 @@ static void devm_iio_kfifo_release(struct device *dev, void *res)
179179
iio_kfifo_free(*(struct iio_buffer **)res);
180180
}
181181

182-
static int devm_iio_kfifo_match(struct device *dev, void *res, void *data)
183-
{
184-
struct iio_buffer **r = res;
185-
186-
if (WARN_ON(!r || !*r))
187-
return 0;
188-
189-
return *r == data;
190-
}
191-
192182
/**
193183
* devm_iio_fifo_allocate - Resource-managed iio_kfifo_allocate()
194184
* @dev: Device to allocate kfifo buffer for
@@ -216,16 +206,4 @@ struct iio_buffer *devm_iio_kfifo_allocate(struct device *dev)
216206
}
217207
EXPORT_SYMBOL(devm_iio_kfifo_allocate);
218208

219-
/**
220-
* devm_iio_fifo_free - Resource-managed iio_kfifo_free()
221-
* @dev: Device the buffer belongs to
222-
* @r: The buffer associated with the device
223-
*/
224-
void devm_iio_kfifo_free(struct device *dev, struct iio_buffer *r)
225-
{
226-
WARN_ON(devres_release(dev, devm_iio_kfifo_release,
227-
devm_iio_kfifo_match, r));
228-
}
229-
EXPORT_SYMBOL(devm_iio_kfifo_free);
230-
231209
MODULE_LICENSE("GPL");

‎include/linux/iio/kfifo_buf.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ struct iio_buffer *iio_kfifo_allocate(void);
99
void iio_kfifo_free(struct iio_buffer *r);
1010

1111
struct iio_buffer *devm_iio_kfifo_allocate(struct device *dev);
12-
void devm_iio_kfifo_free(struct device *dev, struct iio_buffer *r);
1312

1413
#endif

0 commit comments

Comments
 (0)