diff options
author | M Chetan Kumar <m.chetan.kumar@linux.intel.com> | 2022-02-14 10:16:52 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-14 17:09:59 +0300 |
commit | 76f05d88623e559eb9fc41db9fb911e67fab0e7a (patch) | |
tree | 250df0e8aa5f91639aea956a762650cbb8785cea /include/linux/wwan.h | |
parent | 1e997d040ab4f6802a2f88443caf2d84d3465397 (diff) | |
download | linux-76f05d88623e559eb9fc41db9fb911e67fab0e7a.tar.xz |
net: wwan: debugfs obtained dev reference not dropped
WWAN driver call's wwan_get_debugfs_dir() to obtain
WWAN debugfs dir entry. As part of this procedure it
returns a reference to a found device.
Since there is no debugfs interface available at WWAN
subsystem, it is not possible to drop dev reference post
debugfs use. This leads to side effects like post wwan
driver load and reload the wwan instance gets increment
from wwanX to wwanX+1.
A new debugfs interface is added in wwan subsystem so that
wwan driver can drop the obtained dev reference post debugfs
use.
void wwan_put_debugfs_dir(struct dentry *dir)
Signed-off-by: M Chetan Kumar <m.chetan.kumar@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/wwan.h')
-rw-r--r-- | include/linux/wwan.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/wwan.h b/include/linux/wwan.h index afb3334ec8c5..5ce2acf444fb 100644 --- a/include/linux/wwan.h +++ b/include/linux/wwan.h @@ -174,11 +174,13 @@ void wwan_unregister_ops(struct device *parent); #ifdef CONFIG_WWAN_DEBUGFS struct dentry *wwan_get_debugfs_dir(struct device *parent); +void wwan_put_debugfs_dir(struct dentry *dir); #else static inline struct dentry *wwan_get_debugfs_dir(struct device *parent) { return ERR_PTR(-ENODEV); } +static inline void wwan_put_debugfs_dir(struct dentry *dir) {} #endif #endif /* __WWAN_H */ |