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.
Unified · Split
| @@ -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() |
| @@ -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 | ||
| 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 | |||
| 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 for | 184 | * @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 | } |
| 217 | EXPORT_SYMBOL(devm_iio_kfifo_allocate); | 207 | EXPORT_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 | */ | ||
| 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 | |||
| 231 | MODULE_LICENSE("GPL"); | 209 | MODULE_LICENSE("GPL"); |
| @@ -9,6 +9,5 @@ struct iio_buffer *iio_kfifo_allocate(void); · 8 unmodified lines | |||
| 9 | void iio_kfifo_free(struct iio_buffer *r); | 9 | void iio_kfifo_free(struct iio_buffer *r); |
| 10 | 10 | ||
| 11 | struct iio_buffer *devm_iio_kfifo_allocate(struct device *dev); | 11 | struct iio_buffer *devm_iio_kfifo_allocate(struct device *dev); |
| 12 | void devm_iio_kfifo_free(struct device *dev, struct iio_buffer *r); | ||
| 13 | 12 | ||
| 14 | #endif | 13 | #endif |