Commit 1c20163d authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

usb: kill DEBUG compile option

In the drivers that no longer need it, it is removed.
It is removed from the Makefile. Drivers not fully converted
to dynamic debug have it shifted down into the individual
drivers.
Signed-off-by: default avatarOliver Neukum <oneukum@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0b5fa3b2
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# Makefile for USB Host Controller Drivers # Makefile for USB Host Controller Drivers
# #
ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
# tell define_trace.h where to find the xhci trace header # tell define_trace.h where to find the xhci trace header
CFLAGS_xhci-trace.o := -I$(src) CFLAGS_xhci-trace.o := -I$(src)
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
/* this file is part of ehci-hcd.c */ /* this file is part of ehci-hcd.c */
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) #ifdef CONFIG_DYNAMIC_DEBUG
/* check the values in the HCSPARAMS register /* check the values in the HCSPARAMS register
* (host controller _Structural_ parameters) * (host controller _Structural_ parameters)
...@@ -62,7 +62,7 @@ static inline void dbg_hcs_params (struct ehci_hcd *ehci, char *label) {} ...@@ -62,7 +62,7 @@ static inline void dbg_hcs_params (struct ehci_hcd *ehci, char *label) {}
#endif #endif
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) #ifdef CONFIG_DYNAMIC_DEBUG
/* check the values in the HCCPARAMS register /* check the values in the HCCPARAMS register
* (host controller _Capability_ parameters) * (host controller _Capability_ parameters)
...@@ -101,7 +101,7 @@ static inline void dbg_hcc_params (struct ehci_hcd *ehci, char *label) {} ...@@ -101,7 +101,7 @@ static inline void dbg_hcc_params (struct ehci_hcd *ehci, char *label) {}
#endif #endif
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) #ifdef CONFIG_DYNAMIC_DEBUG
static void __maybe_unused static void __maybe_unused
dbg_qtd (const char *label, struct ehci_hcd *ehci, struct ehci_qtd *qtd) dbg_qtd (const char *label, struct ehci_hcd *ehci, struct ehci_qtd *qtd)
...@@ -301,7 +301,7 @@ static inline int __maybe_unused ...@@ -301,7 +301,7 @@ static inline int __maybe_unused
dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status) dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status)
{ return 0; } { return 0; }
#endif /* DEBUG || CONFIG_DYNAMIC_DEBUG */ #endif /* CONFIG_DYNAMIC_DEBUG */
/* functions have the "wrong" filename when they're output... */ /* functions have the "wrong" filename when they're output... */
#define dbg_status(ehci, label, status) { \ #define dbg_status(ehci, label, status) { \
......
...@@ -413,7 +413,7 @@ static int ehci_fsl_mpc512x_drv_suspend(struct device *dev) ...@@ -413,7 +413,7 @@ static int ehci_fsl_mpc512x_drv_suspend(struct device *dev)
struct fsl_usb2_platform_data *pdata = dev_get_platdata(dev); struct fsl_usb2_platform_data *pdata = dev_get_platdata(dev);
u32 tmp; u32 tmp;
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) #ifdef CONFIG_DYNAMIC_DEBUG
u32 mode = ehci_readl(ehci, hcd->regs + FSL_SOC_USB_USBMODE); u32 mode = ehci_readl(ehci, hcd->regs + FSL_SOC_USB_USBMODE);
mode &= USBMODE_CM_MASK; mode &= USBMODE_CM_MASK;
tmp = ehci_readl(ehci, hcd->regs + 0x140); /* usbcmd */ tmp = ehci_readl(ehci, hcd->regs + 0x140); /* usbcmd */
......
...@@ -1313,7 +1313,7 @@ static int __init ehci_hcd_init(void) ...@@ -1313,7 +1313,7 @@ static int __init ehci_hcd_init(void)
sizeof(struct ehci_qh), sizeof(struct ehci_qtd), sizeof(struct ehci_qh), sizeof(struct ehci_qtd),
sizeof(struct ehci_itd), sizeof(struct ehci_sitd)); sizeof(struct ehci_itd), sizeof(struct ehci_sitd));
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) #ifdef CONFIG_DYNAMIC_DEBUG
ehci_debug_root = debugfs_create_dir("ehci", usb_debug_root); ehci_debug_root = debugfs_create_dir("ehci", usb_debug_root);
if (!ehci_debug_root) { if (!ehci_debug_root) {
retval = -ENOENT; retval = -ENOENT;
...@@ -1362,7 +1362,7 @@ static int __init ehci_hcd_init(void) ...@@ -1362,7 +1362,7 @@ static int __init ehci_hcd_init(void)
platform_driver_unregister(&PLATFORM_DRIVER); platform_driver_unregister(&PLATFORM_DRIVER);
clean0: clean0:
#endif #endif
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) #ifdef CONFIG_DYNAMIC_DEBUG
debugfs_remove(ehci_debug_root); debugfs_remove(ehci_debug_root);
ehci_debug_root = NULL; ehci_debug_root = NULL;
err_debug: err_debug:
...@@ -1386,7 +1386,7 @@ static void __exit ehci_hcd_cleanup(void) ...@@ -1386,7 +1386,7 @@ static void __exit ehci_hcd_cleanup(void)
#ifdef PS3_SYSTEM_BUS_DRIVER #ifdef PS3_SYSTEM_BUS_DRIVER
ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
#endif #endif
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) #ifdef CONFIG_DYNAMIC_DEBUG
debugfs_remove(ehci_debug_root); debugfs_remove(ehci_debug_root);
#endif #endif
clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded); clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
......
...@@ -168,13 +168,13 @@ static void ehci_clear_tt_buffer(struct ehci_hcd *ehci, struct ehci_qh *qh, ...@@ -168,13 +168,13 @@ static void ehci_clear_tt_buffer(struct ehci_hcd *ehci, struct ehci_qh *qh,
* Note: this routine is never called for Isochronous transfers. * Note: this routine is never called for Isochronous transfers.
*/ */
if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) { if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) {
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) #ifdef CONFIG_DYNAMIC_DEBUG
struct usb_device *tt = urb->dev->tt->hub; struct usb_device *tt = urb->dev->tt->hub;
dev_dbg(&tt->dev, dev_dbg(&tt->dev,
"clear tt buffer port %d, a%d ep%d t%08x\n", "clear tt buffer port %d, a%d ep%d t%08x\n",
urb->dev->ttport, urb->dev->devnum, urb->dev->ttport, urb->dev->devnum,
usb_pipeendpoint(urb->pipe), token); usb_pipeendpoint(urb->pipe), token);
#endif /* DEBUG || CONFIG_DYNAMIC_DEBUG */ #endif /* CONFIG_DYNAMIC_DEBUG */
if (!ehci_is_TDI(ehci) if (!ehci_is_TDI(ehci)
|| urb->dev->tt->hub != || urb->dev->tt->hub !=
ehci_to_hcd(ehci)->self.root_hub) { ehci_to_hcd(ehci)->self.root_hub) {
......
...@@ -38,7 +38,7 @@ typedef __u16 __bitwise __hc16; ...@@ -38,7 +38,7 @@ typedef __u16 __bitwise __hc16;
#endif #endif
/* statistics can be kept for tuning/monitoring */ /* statistics can be kept for tuning/monitoring */
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) #ifdef CONFIG_DYNAMIC_DEBUG
#define EHCI_STATS #define EHCI_STATS
#endif #endif
...@@ -248,7 +248,7 @@ struct ehci_hcd { /* one per controller */ ...@@ -248,7 +248,7 @@ struct ehci_hcd { /* one per controller */
#endif #endif
/* debug files */ /* debug files */
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) #ifdef CONFIG_DYNAMIC_DEBUG
struct dentry *debug_dir; struct dentry *debug_dir;
#endif #endif
...@@ -832,9 +832,9 @@ static inline u32 hc32_to_cpup (const struct ehci_hcd *ehci, const __hc32 *x) ...@@ -832,9 +832,9 @@ static inline u32 hc32_to_cpup (const struct ehci_hcd *ehci, const __hc32 *x)
dev_warn(ehci_to_hcd(ehci)->self.controller , fmt , ## args) dev_warn(ehci_to_hcd(ehci)->self.controller , fmt , ## args)
#if !defined(DEBUG) && !defined(CONFIG_DYNAMIC_DEBUG) #ifndef CONFIG_DYNAMIC_DEBUG
#define STUB_DEBUG_FILES #define STUB_DEBUG_FILES
#endif /* !DEBUG && !CONFIG_DYNAMIC_DEBUG */ #endif
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
......
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
/* this file is part of imx21-hcd.c */ /* this file is part of imx21-hcd.c */
#ifdef CONFIG_DYNAMIC_DEBUG
#define DEBUG
#endif
#ifndef DEBUG #ifndef DEBUG
static inline void create_debug_files(struct imx21 *imx21) { } static inline void create_debug_files(struct imx21 *imx21) { }
......
...@@ -62,6 +62,10 @@ ...@@ -62,6 +62,10 @@
#include "imx21-hcd.h" #include "imx21-hcd.h"
#ifdef CONFIG_DYNAMIC_DEBUG
#define DEBUG
#endif
#ifdef DEBUG #ifdef DEBUG
#define DEBUG_LOG_FRAME(imx21, etd, event) \ #define DEBUG_LOG_FRAME(imx21, etd, event) \
(etd)->event##_frame = readl((imx21)->regs + USBH_FRMNUB) (etd)->event##_frame = readl((imx21)->regs + USBH_FRMNUB)
......
...@@ -24,6 +24,10 @@ ...@@ -24,6 +24,10 @@
#ifndef __LINUX_IMX21_HCD_H__ #ifndef __LINUX_IMX21_HCD_H__
#define __LINUX_IMX21_HCD_H__ #define __LINUX_IMX21_HCD_H__
#ifdef CONFIG_DYNAMIC_DEBUG
#define DEBUG
#endif
#include <linux/platform_data/usb-mx2.h> #include <linux/platform_data/usb-mx2.h>
#define NUM_ISO_ETDS 2 #define NUM_ISO_ETDS 2
......
...@@ -60,6 +60,10 @@ ...@@ -60,6 +60,10 @@
#define oxu_info(oxu, fmt, args...) \ #define oxu_info(oxu, fmt, args...) \
dev_info(oxu_to_hcd(oxu)->self.controller , fmt , ## args) dev_info(oxu_to_hcd(oxu)->self.controller , fmt , ## args)
#ifdef CONFIG_DYNAMIC_DEBUG
#define DEBUG
#endif
static inline struct usb_hcd *oxu_to_hcd(struct oxu_hcd *oxu) static inline struct usb_hcd *oxu_to_hcd(struct oxu_hcd *oxu)
{ {
return container_of((void *) oxu, struct usb_hcd, hcd_priv); return container_of((void *) oxu, struct usb_hcd, hcd_priv);
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
static struct dentry *uhci_debugfs_root; static struct dentry *uhci_debugfs_root;
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) #ifdef CONFIG_DYNAMIC_DEBUG
/* Handle REALLY large printks so we don't overflow buffers */ /* Handle REALLY large printks so we don't overflow buffers */
static void lprintk(char *buf) static void lprintk(char *buf)
...@@ -635,7 +635,7 @@ static const struct file_operations uhci_debug_operations = { ...@@ -635,7 +635,7 @@ static const struct file_operations uhci_debug_operations = {
#endif /* CONFIG_DEBUG_FS */ #endif /* CONFIG_DEBUG_FS */
#else /* DEBUG || CONFIG_DYNAMIC_DEBUG*/ #else /* CONFIG_DYNAMIC_DEBUG*/
static inline void lprintk(char *buf) static inline void lprintk(char *buf)
{} {}
......
...@@ -69,7 +69,7 @@ MODULE_PARM_DESC(ignore_oc, "ignore hardware overcurrent indications"); ...@@ -69,7 +69,7 @@ MODULE_PARM_DESC(ignore_oc, "ignore hardware overcurrent indications");
* show all queues in /sys/kernel/debug/uhci/[pci_addr] * show all queues in /sys/kernel/debug/uhci/[pci_addr]
* debug = 3, show all TDs in URBs when dumping * debug = 3, show all TDs in URBs when dumping
*/ */
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) #ifdef CONFIG_DYNAMIC_DEBUG
static int debug = 1; static int debug = 1;
module_param(debug, int, S_IRUGO | S_IWUSR); module_param(debug, int, S_IRUGO | S_IWUSR);
...@@ -870,7 +870,7 @@ static int __init uhci_hcd_init(void) ...@@ -870,7 +870,7 @@ static int __init uhci_hcd_init(void)
ignore_oc ? ", overcurrent ignored" : ""); ignore_oc ? ", overcurrent ignored" : "");
set_bit(USB_UHCI_LOADED, &usb_hcds_loaded); set_bit(USB_UHCI_LOADED, &usb_hcds_loaded);
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) #ifdef CONFIG_DYNAMIC_DEBUG
errbuf = kmalloc(ERRBUF_LEN, GFP_KERNEL); errbuf = kmalloc(ERRBUF_LEN, GFP_KERNEL);
if (!errbuf) if (!errbuf)
goto errbuf_failed; goto errbuf_failed;
...@@ -931,7 +931,7 @@ static void __exit uhci_hcd_cleanup(void) ...@@ -931,7 +931,7 @@ static void __exit uhci_hcd_cleanup(void)
#endif #endif
kmem_cache_destroy(uhci_up_cachep); kmem_cache_destroy(uhci_up_cachep);
debugfs_remove(uhci_debugfs_root); debugfs_remove(uhci_debugfs_root);
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) #ifdef CONFIG_DYNAMIC_DEBUG
kfree(errbuf); kfree(errbuf);
#endif #endif
clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded); clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment