diff --git a/drivers/bus/mhi/devices/mhi_netdev.c b/drivers/bus/mhi/devices/mhi_netdev.c index b86a2dc9e12c..1187410ab5fc 100644 --- a/drivers/bus/mhi/devices/mhi_netdev.c +++ b/drivers/bus/mhi/devices/mhi_netdev.c @@ -918,9 +918,14 @@ static void mhi_netdev_create_debugfs_dir(void) dentry = debugfs_create_dir(MHI_NETDEV_DRIVER_NAME, 0); } +static void mhi_netdev_debugfs_remove(void) +{ + debugfs_remove_recursive(dentry); +} + #else -static void mhi_netdev_create_debugfs(struct mhi_netdev_private *mhi_netdev) +static void mhi_netdev_create_debugfs(struct mhi_netdev *mhi_netdev) { } @@ -928,6 +933,10 @@ static void mhi_netdev_create_debugfs_dir(void) { } +static void mhi_netdev_debugfs_remove(void) +{ +} + #endif static void mhi_netdev_remove(struct mhi_device *mhi_dev) @@ -1141,8 +1150,7 @@ module_init(mhi_netdev_init); static void __exit mhi_netdev_exit(void) { - debugfs_remove_recursive(dentry); - + mhi_netdev_debugfs_remove(); mhi_driver_unregister(&mhi_netdev_driver); } module_exit(mhi_netdev_exit);