page-flags: define PG_mlocked behavior on compound pages
[linux-2.6/btrfs-unstable.git] / net / 6lowpan / debugfs.c
blob88eef84df0fc124275e83f58ff78248ffe389a5c
1 /* This program is free software; you can redistribute it and/or modify
2 * it under the terms of the GNU General Public License version 2
3 * as published by the Free Software Foundation.
5 * This program is distributed in the hope that it will be useful,
6 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8 * GNU General Public License for more details.
10 * Authors:
11 * (C) 2015 Pengutronix, Alexander Aring <aar@pengutronix.de>
12 * Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved.
15 #include <net/6lowpan.h>
17 #include "6lowpan_i.h"
19 static struct dentry *lowpan_debugfs;
21 int lowpan_dev_debugfs_init(struct net_device *dev)
23 struct lowpan_priv *lpriv = lowpan_priv(dev);
25 /* creating the root */
26 lpriv->iface_debugfs = debugfs_create_dir(dev->name, lowpan_debugfs);
27 if (!lpriv->iface_debugfs)
28 goto fail;
30 return 0;
32 fail:
33 return -EINVAL;
36 void lowpan_dev_debugfs_exit(struct net_device *dev)
38 debugfs_remove_recursive(lowpan_priv(dev)->iface_debugfs);
41 int __init lowpan_debugfs_init(void)
43 lowpan_debugfs = debugfs_create_dir("6lowpan", NULL);
44 if (!lowpan_debugfs)
45 return -EINVAL;
47 return 0;
50 void lowpan_debugfs_exit(void)
52 debugfs_remove_recursive(lowpan_debugfs);