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
286 devm_iio_device_alloc()286 devm_iio_device_alloc()
287 devm_iio_device_register()287 devm_iio_device_register()
288 devm_iio_kfifo_allocate()288 devm_iio_kfifo_allocate()
289 devm_iio_kfifo_free()
290 devm_iio_triggered_buffer_setup()289 devm_iio_triggered_buffer_setup()
291 devm_iio_trigger_alloc()290 devm_iio_trigger_alloc()
292 devm_iio_trigger_register()291 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
179 iio_kfifo_free(*(struct iio_buffer **)res);179 iio_kfifo_free(*(struct iio_buffer **)res);
180}180}
181 181
182static 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
192/**182/**
193 * devm_iio_fifo_allocate - Resource-managed iio_kfifo_allocate()183 * devm_iio_fifo_allocate - Resource-managed iio_kfifo_allocate()
194 * @dev: Device to allocate kfifo buffer for184 * @dev: Device to allocate kfifo buffer for
@@ -216,16 +206,4 @@ struct iio_buffer *devm_iio_kfifo_allocate(struct device *dev) · 21 unmodified lines
216}206}
217EXPORT_SYMBOL(devm_iio_kfifo_allocate);207EXPORT_SYMBOL(devm_iio_kfifo_allocate);
218 208
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 */
224void 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}
229EXPORT_SYMBOL(devm_iio_kfifo_free);
230
231MODULE_LICENSE("GPL");209MODULE_LICENSE("GPL");
include/linux/iio/kfifo_buf.h+0−1
@@ -9,6 +9,5 @@ struct iio_buffer *iio_kfifo_allocate(void); · 8 unmodified lines
9void iio_kfifo_free(struct iio_buffer *r);9void iio_kfifo_free(struct iio_buffer *r);
10 10
11struct iio_buffer *devm_iio_kfifo_allocate(struct device *dev);11struct iio_buffer *devm_iio_kfifo_allocate(struct device *dev);
12void devm_iio_kfifo_free(struct device *dev, struct iio_buffer *r);
13 12
14#endif13#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