History

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.

Alexandru Ardelean committed 6 years ago

Commit 608d98a1 parent 05c09e33 files · +0 −24Browse files

Unified · Split

3 files
  1. Documentation/driver-api/driver-model/devres.rst +0 −1
  2. drivers/iio/buffer/kfifo_buf.c +0 −22
  3. include/linux/iio/kfifo_buf.h +0 −1
Documentation/driver-api/driver-model/devres.rst+0−1
@@ -286,7 +286,6 @@ IIO · 285 unmodified lines
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+0−22
@@ -179,16 +179,6 @@ static void devm_iio_kfifo_release(struct device *dev, void *res) · 178 unmodified lines
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) · 21 unmodified lines
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+0−1
@@ -9,6 +9,5 @@ struct iio_buffer *iio_kfifo_allocate(void); · 8 unmodified lines
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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t