diff options
author | Lars-Peter Clausen | 2013-09-21 17:21:00 +0200 |
---|---|---|
committer | Jonathan Cameron | 2013-09-30 22:46:10 +0200 |
commit | bc4c9612922524ce3eba64c5e7d6323f8e174ca1 (patch) | |
tree | 43297274b2f0ba67dccfe9bd17395275ef13c783 /drivers | |
parent | iio: amplifiers: ad8366: Remove regulator_put (diff) | |
download | kernel-qcow2-linux-bc4c9612922524ce3eba64c5e7d6323f8e174ca1.tar.gz kernel-qcow2-linux-bc4c9612922524ce3eba64c5e7d6323f8e174ca1.tar.xz kernel-qcow2-linux-bc4c9612922524ce3eba64c5e7d6323f8e174ca1.zip |
iio: Remove debugfs entries in iio_device_unregister()
Remove the the debugfs entries in iio_device_unregister(). Otherwise the debugfs
entries might still be accessible even though the device used in the debugfs
callback has already been freed.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iio/industrialio-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 8e84cd522e49..f95c6979efd8 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -852,7 +852,6 @@ static void iio_dev_release(struct device *device) iio_device_unregister_trigger_consumer(indio_dev); iio_device_unregister_eventset(indio_dev); iio_device_unregister_sysfs(indio_dev); - iio_device_unregister_debugfs(indio_dev); ida_simple_remove(&iio_ida, indio_dev->id); kfree(indio_dev); @@ -1087,6 +1086,7 @@ void iio_device_unregister(struct iio_dev *indio_dev) if (indio_dev->chrdev.dev) cdev_del(&indio_dev->chrdev); + iio_device_unregister_debugfs(indio_dev); iio_disable_all_buffers(indio_dev); |