iio: buffer: drop devm_iio_kfifo_free() API call
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Thu, 27 Feb 2020 13:52:27 +0000 (15:52 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 19 Apr 2020 15:56:38 +0000 (16:56 +0100)
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>
Documentation/driver-api/driver-model/devres.rst
drivers/iio/buffer/kfifo_buf.c
include/linux/iio/kfifo_buf.h

index 10ccebe9f7c18bc278702bf2f0e87c2a71aaf96f..91b0b8e5556c25487bf42a94ccf9b96f597f6286 100644 (file)
@@ -286,7 +286,6 @@ IIO
   devm_iio_device_alloc()
   devm_iio_device_register()
   devm_iio_kfifo_allocate()
-  devm_iio_kfifo_free()
   devm_iio_triggered_buffer_setup()
   devm_iio_trigger_alloc()
   devm_iio_trigger_register()
index 3150f8ab984bac08ae6c155d22080995e6570c06..1359abed3b31e173d26ce48b6b9ec5e923c5e981 100644 (file)
@@ -179,16 +179,6 @@ static void devm_iio_kfifo_release(struct device *dev, void *res)
        iio_kfifo_free(*(struct iio_buffer **)res);
 }
 
-static int devm_iio_kfifo_match(struct device *dev, void *res, void *data)
-{
-       struct iio_buffer **r = res;
-
-       if (WARN_ON(!r || !*r))
-               return 0;
-
-       return *r == data;
-}
-
 /**
  * devm_iio_fifo_allocate - Resource-managed iio_kfifo_allocate()
  * @dev:               Device to allocate kfifo buffer for
@@ -216,16 +206,4 @@ struct iio_buffer *devm_iio_kfifo_allocate(struct device *dev)
 }
 EXPORT_SYMBOL(devm_iio_kfifo_allocate);
 
-/**
- * devm_iio_fifo_free - Resource-managed iio_kfifo_free()
- * @dev:               Device the buffer belongs to
- * @r:                 The buffer associated with the device
- */
-void devm_iio_kfifo_free(struct device *dev, struct iio_buffer *r)
-{
-       WARN_ON(devres_release(dev, devm_iio_kfifo_release,
-                              devm_iio_kfifo_match, r));
-}
-EXPORT_SYMBOL(devm_iio_kfifo_free);
-
 MODULE_LICENSE("GPL");
index 764659e01b68cdf2f865f0cd4aa519f698943d56..1fc1efa7799df968d9f350b51f04c16cfcc4de25 100644 (file)
@@ -9,6 +9,5 @@ struct iio_buffer *iio_kfifo_allocate(void);
 void iio_kfifo_free(struct iio_buffer *r);
 
 struct iio_buffer *devm_iio_kfifo_allocate(struct device *dev);
-void devm_iio_kfifo_free(struct device *dev, struct iio_buffer *r);
 
 #endif