net: wwan: common debugfs base dir for wwan device
authorM Chetan Kumar <m.chetan.kumar@linux.intel.com>
Sat, 20 Nov 2021 16:21:54 +0000 (21:51 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Nov 2021 13:23:08 +0000 (13:23 +0000)
commitc4804670026b93f4ebddda30af89fd737bf93931
treeb4635f7bdfa40d9dcfdd09357e259bf4e7cd86c1
parenta9c2cf9e93335968e894c16921c151f016fa36c7
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>
drivers/net/wwan/wwan_core.c
include/linux/wwan.h