Function mt76_register_debugfs just call mt76_register_debugfs_fops with NULL op parameter. This change is to cleanup the code a bit, elete the meaningless mt76_register_debugfs, and all call mt76_register_debugfs_fops. Signed-off-by: Bernard Zhao <bernard@xxxxxxxx> --- Changes since V1: * make the title more informative --- drivers/net/wireless/mediatek/mt76/mt76.h | 4 ---- drivers/net/wireless/mediatek/mt76/mt7603/debugfs.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt76x02_debugfs.c | 3 ++- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h index 882fb5d2517f..7967ac210c9b 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76.h +++ b/drivers/net/wireless/mediatek/mt76/mt76.h @@ -927,10 +927,6 @@ int mt76_register_phy(struct mt76_phy *phy, bool vht, struct dentry *mt76_register_debugfs_fops(struct mt76_phy *phy, const struct file_operations *ops); -static inline struct dentry *mt76_register_debugfs(struct mt76_dev *dev) -{ - return mt76_register_debugfs_fops(&dev->phy, NULL); -} int mt76_queues_read(struct seq_file *s, void *data); void mt76_seq_puts_array(struct seq_file *file, const char *str, diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7603/debugfs.c index f52165dff422..6bfe28c82f4e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7603/debugfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt7603/debugfs.c @@ -96,8 +96,9 @@ DEFINE_SHOW_ATTRIBUTE(mt7603_ampdu_stat); void mt7603_init_debugfs(struct mt7603_dev *dev) { struct dentry *dir; + struct mt76_dev *pdev = &dev->mt76; - dir = mt76_register_debugfs(&dev->mt76); + dir = mt76_register_debugfs_fops(&pdev->phy, NULL); if (!dir) return; diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_debugfs.c b/drivers/net/wireless/mediatek/mt76/mt76x02_debugfs.c index c4fe1c436aaa..346501d7d622 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_debugfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_debugfs.c @@ -117,8 +117,9 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_edcca, mt76_edcca_get, mt76_edcca_set, void mt76x02_init_debugfs(struct mt76x02_dev *dev) { struct dentry *dir; + struct mt76_dev *pdev = &dev->mt76; - dir = mt76_register_debugfs(&dev->mt76); + dir = mt76_register_debugfs_fops(&pdev->phy, NULL); if (!dir) return; -- 2.33.1