Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 151336
b: refs/heads/master
c: 00048b8
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jun 16, 2009
1 parent 102e318 commit 3ccdd99
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84fe6e799deaf14e2c7a941e805cd93d83f90927
refs/heads/master: 00048b8bde5a6cbd9c3a76f272cc9ddb55705e37
22 changes: 22 additions & 0 deletions trunk/drivers/usb/core/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <linux/usb.h>
#include <linux/mutex.h>
#include <linux/workqueue.h>
#include <linux/debugfs.h>

#include <asm/io.h>
#include <linux/scatterlist.h>
Expand Down Expand Up @@ -1001,6 +1002,22 @@ static struct notifier_block usb_bus_nb = {
.notifier_call = usb_bus_notify,
};

struct dentry *usb_debug_root;
EXPORT_SYMBOL_GPL(usb_debug_root);

static int usb_debugfs_init(void)
{
usb_debug_root = debugfs_create_dir("usb", NULL);
if (!usb_debug_root)
return -ENOENT;
return 0;
}

static void usb_debugfs_cleanup(void)
{
debugfs_remove(usb_debug_root);
}

/*
* Init
*/
Expand All @@ -1012,6 +1029,10 @@ static int __init usb_init(void)
return 0;
}

retval = usb_debugfs_init();
if (retval)
goto out;

retval = ksuspend_usb_init();
if (retval)
goto out;
Expand Down Expand Up @@ -1083,6 +1104,7 @@ static void __exit usb_exit(void)
bus_unregister_notifier(&usb_bus_type, &usb_bus_nb);
bus_unregister(&usb_bus_type);
ksuspend_usb_cleanup();
usb_debugfs_cleanup();
}

subsys_initcall(usb_init);
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/linux/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -1558,6 +1558,9 @@ extern void usb_unregister_notify(struct notifier_block *nb);
#define err(format, arg...) printk(KERN_ERR KBUILD_MODNAME ": " \
format "\n" , ## arg)

/* debugfs stuff */
extern struct dentry *usb_debug_root;

#endif /* __KERNEL__ */

#endif

0 comments on commit 3ccdd99

Please sign in to comment.