diff options
Diffstat (limited to 'drivers/usb/host/ohci-hcd.c')
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index ddd4ee1f2413..baca09af6076 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/dmapool.h> | 36 | #include <linux/dmapool.h> |
37 | #include <linux/reboot.h> | 37 | #include <linux/reboot.h> |
38 | #include <linux/workqueue.h> | 38 | #include <linux/workqueue.h> |
39 | #include <linux/debugfs.h> | ||
39 | 40 | ||
40 | #include <asm/io.h> | 41 | #include <asm/io.h> |
41 | #include <asm/irq.h> | 42 | #include <asm/irq.h> |
@@ -1068,6 +1069,14 @@ static int __init ohci_hcd_mod_init(void) | |||
1068 | pr_debug ("%s: block sizes: ed %Zd td %Zd\n", hcd_name, | 1069 | pr_debug ("%s: block sizes: ed %Zd td %Zd\n", hcd_name, |
1069 | sizeof (struct ed), sizeof (struct td)); | 1070 | sizeof (struct ed), sizeof (struct td)); |
1070 | 1071 | ||
1072 | #ifdef DEBUG | ||
1073 | ohci_debug_root = debugfs_create_dir("ohci", NULL); | ||
1074 | if (!ohci_debug_root) { | ||
1075 | retval = -ENOENT; | ||
1076 | goto error_debug; | ||
1077 | } | ||
1078 | #endif | ||
1079 | |||
1071 | #ifdef PS3_SYSTEM_BUS_DRIVER | 1080 | #ifdef PS3_SYSTEM_BUS_DRIVER |
1072 | retval = ps3_ohci_driver_register(&PS3_SYSTEM_BUS_DRIVER); | 1081 | retval = ps3_ohci_driver_register(&PS3_SYSTEM_BUS_DRIVER); |
1073 | if (retval < 0) | 1082 | if (retval < 0) |
@@ -1130,6 +1139,12 @@ static int __init ohci_hcd_mod_init(void) | |||
1130 | ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); | 1139 | ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); |
1131 | error_ps3: | 1140 | error_ps3: |
1132 | #endif | 1141 | #endif |
1142 | #ifdef DEBUG | ||
1143 | debugfs_remove(ohci_debug_root); | ||
1144 | ohci_debug_root = NULL; | ||
1145 | error_debug: | ||
1146 | #endif | ||
1147 | |||
1133 | return retval; | 1148 | return retval; |
1134 | } | 1149 | } |
1135 | module_init(ohci_hcd_mod_init); | 1150 | module_init(ohci_hcd_mod_init); |
@@ -1154,6 +1169,9 @@ static void __exit ohci_hcd_mod_exit(void) | |||
1154 | #ifdef PS3_SYSTEM_BUS_DRIVER | 1169 | #ifdef PS3_SYSTEM_BUS_DRIVER |
1155 | ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); | 1170 | ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); |
1156 | #endif | 1171 | #endif |
1172 | #ifdef DEBUG | ||
1173 | debugfs_remove(ohci_debug_root); | ||
1174 | #endif | ||
1157 | } | 1175 | } |
1158 | module_exit(ohci_hcd_mod_exit); | 1176 | module_exit(ohci_hcd_mod_exit); |
1159 | 1177 | ||