diff options
author | M Chetan Kumar <m.chetan.kumar@linux.intel.com> | 2021-11-20 19:21:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-22 16:23:08 +0300 |
commit | c4804670026b93f4ebddda30af89fd737bf93931 (patch) | |
tree | b4635f7bdfa40d9dcfdd09357e259bf4e7cd86c1 /include/linux/wwan.h | |
parent | a9c2cf9e93335968e894c16921c151f016fa36c7 (diff) | |
download | linux-c4804670026b93f4ebddda30af89fd737bf93931.tar.xz |
net: wwan: common debugfs base dir for wwan device
This patch set brings in a common debugfs base directory
i.e. /sys/kernel/debugfs/wwan/ in WWAN Subsystem for a
WWAN device instance. So that it avoids driver polluting
debugfs root with unrelated directories & possible name
collusion.
Having a common debugfs base directory for WWAN drivers
eases user to match control devices with debugfs entries.
WWAN Subsystem creates dentry (/sys/kernel/debugfs/wwan)
on module load & removes dentry on module unload.
When driver registers a new wwan device, dentry (wwanX)
is created for WWAN device instance & on driver unregister
dentry is removed.
New API is introduced to return the wwan device instance
dentry so that driver can create debugfs entries under it.
Signed-off-by: M Chetan Kumar <m.chetan.kumar@linux.intel.com>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
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 9fac819f92e3..1646aa3e6779 100644 --- a/include/linux/wwan.h +++ b/include/linux/wwan.h @@ -171,4 +171,6 @@ int wwan_register_ops(struct device *parent, const struct wwan_ops *ops, void wwan_unregister_ops(struct device *parent); +struct dentry *wwan_get_debugfs_dir(struct device *parent); + #endif /* __WWAN_H */ |