Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: core: drop devm_iio_device_unregister() 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>

authored by

Alexandru Ardelean and committed by
Jonathan Cameron
83af573e a17cb784

-22
-1
Documentation/driver-api/driver-model/devres.rst
··· 286 286 devm_iio_device_alloc() 287 287 devm_iio_device_free() 288 288 devm_iio_device_register() 289 - devm_iio_device_unregister() 290 289 devm_iio_kfifo_allocate() 291 290 devm_iio_kfifo_free() 292 291 devm_iio_triggered_buffer_setup()
-17
drivers/iio/industrialio-core.c
··· 1831 1831 EXPORT_SYMBOL_GPL(__devm_iio_device_register); 1832 1832 1833 1833 /** 1834 - * devm_iio_device_unregister - Resource-managed iio_device_unregister() 1835 - * @dev: Device this iio_dev belongs to 1836 - * @indio_dev: the iio_dev associated with the device 1837 - * 1838 - * Unregister iio_dev registered with devm_iio_device_register(). 1839 - */ 1840 - void devm_iio_device_unregister(struct device *dev, struct iio_dev *indio_dev) 1841 - { 1842 - int rc; 1843 - 1844 - rc = devres_release(dev, devm_iio_device_unreg, 1845 - devm_iio_device_match, indio_dev); 1846 - WARN_ON(rc); 1847 - } 1848 - EXPORT_SYMBOL_GPL(devm_iio_device_unregister); 1849 - 1850 - /** 1851 1834 * iio_device_claim_direct_mode - Keep device in direct mode 1852 1835 * @indio_dev: the iio_dev associated with the device 1853 1836 *
-4
include/linux/iio/iio.h
··· 593 593 * calls iio_device_register() internally. Refer to that function for more 594 594 * information. 595 595 * 596 - * If an iio_dev registered with this function needs to be unregistered 597 - * separately, devm_iio_device_unregister() must be used. 598 - * 599 596 * RETURNS: 600 597 * 0 on success, negative error number on failure. 601 598 */ ··· 600 603 __devm_iio_device_register((dev), (indio_dev), THIS_MODULE); 601 604 int __devm_iio_device_register(struct device *dev, struct iio_dev *indio_dev, 602 605 struct module *this_mod); 603 - void devm_iio_device_unregister(struct device *dev, struct iio_dev *indio_dev); 604 606 int iio_push_event(struct iio_dev *indio_dev, u64 ev_code, s64 timestamp); 605 607 int iio_device_claim_direct_mode(struct iio_dev *indio_dev); 606 608 void iio_device_release_direct_mode(struct iio_dev *indio_dev);