aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/uwb/pal.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/uwb/pal.c')
-rw-r--r--drivers/uwb/pal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/uwb/pal.c b/drivers/uwb/pal.c
index 605765124f5b..99a19c199095 100644
--- a/drivers/uwb/pal.c
+++ b/drivers/uwb/pal.c
@@ -16,6 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/debugfs.h>
19#include <linux/uwb.h> 20#include <linux/uwb.h>
20 21
21#include "uwb-internal.h" 22#include "uwb-internal.h"
@@ -54,6 +55,8 @@ int uwb_pal_register(struct uwb_pal *pal)
54 } 55 }
55 } 56 }
56 57
58 pal->debugfs_dir = uwb_dbg_create_pal_dir(pal);
59
57 mutex_lock(&rc->uwb_dev.mutex); 60 mutex_lock(&rc->uwb_dev.mutex);
58 list_add(&pal->node, &rc->pals); 61 list_add(&pal->node, &rc->pals);
59 mutex_unlock(&rc->uwb_dev.mutex); 62 mutex_unlock(&rc->uwb_dev.mutex);
@@ -76,6 +79,8 @@ void uwb_pal_unregister(struct uwb_pal *pal)
76 list_del(&pal->node); 79 list_del(&pal->node);
77 mutex_unlock(&rc->uwb_dev.mutex); 80 mutex_unlock(&rc->uwb_dev.mutex);
78 81
82 debugfs_remove(pal->debugfs_dir);
83
79 if (pal->device) { 84 if (pal->device) {
80 sysfs_remove_link(&rc->uwb_dev.dev.kobj, pal->name); 85 sysfs_remove_link(&rc->uwb_dev.dev.kobj, pal->name);
81 sysfs_remove_link(&pal->device->kobj, "uwb_rc"); 86 sysfs_remove_link(&pal->device->kobj, "uwb_rc");