diff options
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/btmrvl_debugfs.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/bluetooth/btmrvl_debugfs.c b/drivers/bluetooth/btmrvl_debugfs.c index d43b5cb864ef..3126a3d0c45c 100644 --- a/drivers/bluetooth/btmrvl_debugfs.c +++ b/drivers/bluetooth/btmrvl_debugfs.c | |||
@@ -26,7 +26,8 @@ | |||
26 | #include "btmrvl_drv.h" | 26 | #include "btmrvl_drv.h" |
27 | 27 | ||
28 | struct btmrvl_debugfs_data { | 28 | struct btmrvl_debugfs_data { |
29 | struct dentry *root_dir, *config_dir, *status_dir; | 29 | struct dentry *config_dir; |
30 | struct dentry *status_dir; | ||
30 | 31 | ||
31 | /* config */ | 32 | /* config */ |
32 | struct dentry *psmode; | 33 | struct dentry *psmode; |
@@ -363,6 +364,9 @@ void btmrvl_debugfs_init(struct hci_dev *hdev) | |||
363 | struct btmrvl_private *priv = hdev->driver_data; | 364 | struct btmrvl_private *priv = hdev->driver_data; |
364 | struct btmrvl_debugfs_data *dbg; | 365 | struct btmrvl_debugfs_data *dbg; |
365 | 366 | ||
367 | if (!hdev->debugfs) | ||
368 | return; | ||
369 | |||
366 | dbg = kzalloc(sizeof(*dbg), GFP_KERNEL); | 370 | dbg = kzalloc(sizeof(*dbg), GFP_KERNEL); |
367 | priv->debugfs_data = dbg; | 371 | priv->debugfs_data = dbg; |
368 | 372 | ||
@@ -371,9 +375,7 @@ void btmrvl_debugfs_init(struct hci_dev *hdev) | |||
371 | return; | 375 | return; |
372 | } | 376 | } |
373 | 377 | ||
374 | dbg->root_dir = debugfs_create_dir("btmrvl", NULL); | 378 | dbg->config_dir = debugfs_create_dir("config", hdev->debugfs); |
375 | |||
376 | dbg->config_dir = debugfs_create_dir("config", dbg->root_dir); | ||
377 | 379 | ||
378 | dbg->psmode = debugfs_create_file("psmode", 0644, dbg->config_dir, | 380 | dbg->psmode = debugfs_create_file("psmode", 0644, dbg->config_dir, |
379 | hdev->driver_data, &btmrvl_psmode_fops); | 381 | hdev->driver_data, &btmrvl_psmode_fops); |
@@ -388,7 +390,7 @@ void btmrvl_debugfs_init(struct hci_dev *hdev) | |||
388 | dbg->hscfgcmd = debugfs_create_file("hscfgcmd", 0644, dbg->config_dir, | 390 | dbg->hscfgcmd = debugfs_create_file("hscfgcmd", 0644, dbg->config_dir, |
389 | hdev->driver_data, &btmrvl_hscfgcmd_fops); | 391 | hdev->driver_data, &btmrvl_hscfgcmd_fops); |
390 | 392 | ||
391 | dbg->status_dir = debugfs_create_dir("status", dbg->root_dir); | 393 | dbg->status_dir = debugfs_create_dir("status", hdev->debugfs); |
392 | dbg->curpsmode = debugfs_create_file("curpsmode", 0444, | 394 | dbg->curpsmode = debugfs_create_file("curpsmode", 0444, |
393 | dbg->status_dir, | 395 | dbg->status_dir, |
394 | hdev->driver_data, | 396 | hdev->driver_data, |
@@ -425,7 +427,5 @@ void btmrvl_debugfs_remove(struct hci_dev *hdev) | |||
425 | debugfs_remove(dbg->txdnldready); | 427 | debugfs_remove(dbg->txdnldready); |
426 | debugfs_remove(dbg->status_dir); | 428 | debugfs_remove(dbg->status_dir); |
427 | 429 | ||
428 | debugfs_remove(dbg->root_dir); | ||
429 | |||
430 | kfree(dbg); | 430 | kfree(dbg); |
431 | } | 431 | } |