aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/fusbh200-hcd.c
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.de>2013-11-18 07:23:08 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-03 13:28:40 -0500
commit0ada24a497c3f82cb806bb4b923a2edcf8ee7815 (patch)
tree11aff79a4d9d0b76dcc962616ca279b13bb94f29 /drivers/usb/host/fusbh200-hcd.c
parentbe5ac4c43d13f68320de16c2d1bcecdba0adbea1 (diff)
fusbh200: always build debugfs support
This gets rid of conditional compilation. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/fusbh200-hcd.c')
-rw-r--r--drivers/usb/host/fusbh200-hcd.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/drivers/usb/host/fusbh200-hcd.c b/drivers/usb/host/fusbh200-hcd.c
index e1c6d850a7e1..b9f9592e2679 100644
--- a/drivers/usb/host/fusbh200-hcd.c
+++ b/drivers/usb/host/fusbh200-hcd.c
@@ -159,8 +159,6 @@ static inline void dbg_hcc_params (struct fusbh200_hcd *fusbh200, char *label) {
159 159
160#endif 160#endif
161 161
162#ifdef DEBUG
163
164static void __maybe_unused 162static void __maybe_unused
165dbg_qtd (const char *label, struct fusbh200_hcd *fusbh200, struct fusbh200_qtd *qtd) 163dbg_qtd (const char *label, struct fusbh200_hcd *fusbh200, struct fusbh200_qtd *qtd)
166{ 164{
@@ -302,29 +300,6 @@ dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status)
302 (status & PORT_CONNECT) ? " CONNECT" : ""); 300 (status & PORT_CONNECT) ? " CONNECT" : "");
303} 301}
304 302
305#else
306static inline void __maybe_unused
307dbg_qh (char *label, struct fusbh200_hcd *fusbh200, struct fusbh200_qh *qh)
308{}
309
310static inline int __maybe_unused
311dbg_status_buf (char *buf, unsigned len, const char *label, u32 status)
312{ return 0; }
313
314static inline int __maybe_unused
315dbg_command_buf (char *buf, unsigned len, const char *label, u32 command)
316{ return 0; }
317
318static inline int __maybe_unused
319dbg_intr_buf (char *buf, unsigned len, const char *label, u32 enable)
320{ return 0; }
321
322static inline int __maybe_unused
323dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status)
324{ return 0; }
325
326#endif /* DEBUG */
327
328/* functions have the "wrong" filename when they're output... */ 303/* functions have the "wrong" filename when they're output... */
329#define dbg_status(fusbh200, label, status) { \ 304#define dbg_status(fusbh200, label, status) { \
330 char _buf [80]; \ 305 char _buf [80]; \
@@ -5936,13 +5911,11 @@ static int __init fusbh200_hcd_init(void)
5936 sizeof(struct fusbh200_qh), sizeof(struct fusbh200_qtd), 5911 sizeof(struct fusbh200_qh), sizeof(struct fusbh200_qtd),
5937 sizeof(struct fusbh200_itd)); 5912 sizeof(struct fusbh200_itd));
5938 5913
5939#ifdef DEBUG
5940 fusbh200_debug_root = debugfs_create_dir("fusbh200", usb_debug_root); 5914 fusbh200_debug_root = debugfs_create_dir("fusbh200", usb_debug_root);
5941 if (!fusbh200_debug_root) { 5915 if (!fusbh200_debug_root) {
5942 retval = -ENOENT; 5916 retval = -ENOENT;
5943 goto err_debug; 5917 goto err_debug;
5944 } 5918 }
5945#endif
5946 5919
5947 retval = platform_driver_register(&fusbh200_hcd_fusbh200_driver); 5920 retval = platform_driver_register(&fusbh200_hcd_fusbh200_driver);
5948 if (retval < 0) 5921 if (retval < 0)
@@ -5951,11 +5924,9 @@ static int __init fusbh200_hcd_init(void)
5951 5924
5952 platform_driver_unregister(&fusbh200_hcd_fusbh200_driver); 5925 platform_driver_unregister(&fusbh200_hcd_fusbh200_driver);
5953clean: 5926clean:
5954#ifdef DEBUG
5955 debugfs_remove(fusbh200_debug_root); 5927 debugfs_remove(fusbh200_debug_root);
5956 fusbh200_debug_root = NULL; 5928 fusbh200_debug_root = NULL;
5957err_debug: 5929err_debug:
5958#endif
5959 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded); 5930 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
5960 return retval; 5931 return retval;
5961} 5932}
@@ -5964,9 +5935,7 @@ module_init(fusbh200_hcd_init);
5964static void __exit fusbh200_hcd_cleanup(void) 5935static void __exit fusbh200_hcd_cleanup(void)
5965{ 5936{
5966 platform_driver_unregister(&fusbh200_hcd_fusbh200_driver); 5937 platform_driver_unregister(&fusbh200_hcd_fusbh200_driver);
5967#ifdef DEBUG
5968 debugfs_remove(fusbh200_debug_root); 5938 debugfs_remove(fusbh200_debug_root);
5969#endif
5970 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded); 5939 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
5971} 5940}
5972module_exit(fusbh200_hcd_cleanup); 5941module_exit(fusbh200_hcd_cleanup);