]> git.baikalelectronics.ru Git - kernel.git/commit
net: wwan: debugfs obtained dev reference not dropped
authorM Chetan Kumar <m.chetan.kumar@linux.intel.com>
Mon, 14 Feb 2022 07:16:52 +0000 (12:46 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Feb 2022 14:09:59 +0000 (14:09 +0000)
commit8b44c420037f3532073d36d8348d5669e3782196
tree250df0e8aa5f91639aea956a762650cbb8785cea
parentb25c56e10bbdad47727328620ce54e4b52faf038
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>
drivers/net/wwan/wwan_core.c
include/linux/wwan.h