lkml.org 
[lkml]   [2019]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] iio: core: use debugfs_remove_recursive() on IIO unload
    Date
    From: Lars-Peter Clausen <lars@metafoo.de>

    The debugfs dir may have multiple files/dirs attached to it. Use
    debugfs_remove_recursive() to clean it up when the IIO module unloads.

    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
    ---

    Note: note sure if this needs a Fixes tag. It's been in here for ages now,
    so it may not be a big issue.

    drivers/iio/industrialio-core.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
    index 9a3579943574..dab67cb69fe6 100644
    --- a/drivers/iio/industrialio-core.c
    +++ b/drivers/iio/industrialio-core.c
    @@ -292,7 +292,7 @@ static void __exit iio_exit(void)
    if (iio_devt)
    unregister_chrdev_region(iio_devt, IIO_DEV_MAX);
    bus_unregister(&iio_bus_type);
    - debugfs_remove(iio_debugfs_dentry);
    + debugfs_remove_recursive(iio_debugfs_dentry);
    }

    #if defined(CONFIG_DEBUG_FS)
    --
    2.20.1
    \
     
     \ /
      Last update: 2019-12-11 15:58    [W:3.690 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site