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: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Oliver Neukum 2013-11-18 13:23:16 +01:00 committed by Greg Kroah-Hartman
parent 0b5fa3b21f
commit 1c20163d30
12 changed files with 35 additions and 21 deletions

View File

@ -2,8 +2,6 @@
# Makefile for USB Host Controller Drivers
#
ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
# tell define_trace.h where to find the xhci trace header
CFLAGS_xhci-trace.o := -I$(src)

View File

@ -18,7 +18,7 @@
/* 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
* (host controller _Structural_ parameters)
@ -62,7 +62,7 @@ static inline void dbg_hcs_params (struct ehci_hcd *ehci, char *label) {}
#endif
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
#ifdef CONFIG_DYNAMIC_DEBUG
/* check the values in the HCCPARAMS register
* (host controller _Capability_ parameters)
@ -101,7 +101,7 @@ static inline void dbg_hcc_params (struct ehci_hcd *ehci, char *label) {}
#endif
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
#ifdef CONFIG_DYNAMIC_DEBUG
static void __maybe_unused
dbg_qtd (const char *label, struct ehci_hcd *ehci, struct ehci_qtd *qtd)
@ -301,7 +301,7 @@ static inline int __maybe_unused
dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status)
{ return 0; }
#endif /* DEBUG || CONFIG_DYNAMIC_DEBUG */
#endif /* CONFIG_DYNAMIC_DEBUG */
/* functions have the "wrong" filename when they're output... */
#define dbg_status(ehci, label, status) { \

View File

@ -413,7 +413,7 @@ static int ehci_fsl_mpc512x_drv_suspend(struct device *dev)
struct fsl_usb2_platform_data *pdata = dev_get_platdata(dev);
u32 tmp;
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
#ifdef CONFIG_DYNAMIC_DEBUG
u32 mode = ehci_readl(ehci, hcd->regs + FSL_SOC_USB_USBMODE);
mode &= USBMODE_CM_MASK;
tmp = ehci_readl(ehci, hcd->regs + 0x140); /* usbcmd */

View File

@ -1313,7 +1313,7 @@ static int __init ehci_hcd_init(void)
sizeof(struct ehci_qh), sizeof(struct ehci_qtd),
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);
if (!ehci_debug_root) {
retval = -ENOENT;
@ -1362,7 +1362,7 @@ clean2:
platform_driver_unregister(&PLATFORM_DRIVER);
clean0:
#endif
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
#ifdef CONFIG_DYNAMIC_DEBUG
debugfs_remove(ehci_debug_root);
ehci_debug_root = NULL;
err_debug:
@ -1386,7 +1386,7 @@ static void __exit ehci_hcd_cleanup(void)
#ifdef PS3_SYSTEM_BUS_DRIVER
ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
#endif
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
#ifdef CONFIG_DYNAMIC_DEBUG
debugfs_remove(ehci_debug_root);
#endif
clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);

View File

@ -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.
*/
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;
dev_dbg(&tt->dev,
"clear tt buffer port %d, a%d ep%d t%08x\n",
urb->dev->ttport, urb->dev->devnum,
usb_pipeendpoint(urb->pipe), token);
#endif /* DEBUG || CONFIG_DYNAMIC_DEBUG */
#endif /* CONFIG_DYNAMIC_DEBUG */
if (!ehci_is_TDI(ehci)
|| urb->dev->tt->hub !=
ehci_to_hcd(ehci)->self.root_hub) {

View File

@ -38,7 +38,7 @@ typedef __u16 __bitwise __hc16;
#endif
/* statistics can be kept for tuning/monitoring */
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
#ifdef CONFIG_DYNAMIC_DEBUG
#define EHCI_STATS
#endif
@ -248,7 +248,7 @@ struct ehci_hcd { /* one per controller */
#endif
/* debug files */
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
#ifdef CONFIG_DYNAMIC_DEBUG
struct dentry *debug_dir;
#endif
@ -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)
#if !defined(DEBUG) && !defined(CONFIG_DYNAMIC_DEBUG)
#ifndef CONFIG_DYNAMIC_DEBUG
#define STUB_DEBUG_FILES
#endif /* !DEBUG && !CONFIG_DYNAMIC_DEBUG */
#endif
/*-------------------------------------------------------------------------*/

View File

@ -18,6 +18,10 @@
/* this file is part of imx21-hcd.c */
#ifdef CONFIG_DYNAMIC_DEBUG
#define DEBUG
#endif
#ifndef DEBUG
static inline void create_debug_files(struct imx21 *imx21) { }

View File

@ -62,6 +62,10 @@
#include "imx21-hcd.h"
#ifdef CONFIG_DYNAMIC_DEBUG
#define DEBUG
#endif
#ifdef DEBUG
#define DEBUG_LOG_FRAME(imx21, etd, event) \
(etd)->event##_frame = readl((imx21)->regs + USBH_FRMNUB)

View File

@ -24,6 +24,10 @@
#ifndef __LINUX_IMX21_HCD_H__
#define __LINUX_IMX21_HCD_H__
#ifdef CONFIG_DYNAMIC_DEBUG
#define DEBUG
#endif
#include <linux/platform_data/usb-mx2.h>
#define NUM_ISO_ETDS 2

View File

@ -60,6 +60,10 @@
#define oxu_info(oxu, 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)
{
return container_of((void *) oxu, struct usb_hcd, hcd_priv);

View File

@ -20,7 +20,7 @@
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 */
static void lprintk(char *buf)
@ -635,7 +635,7 @@ static const struct file_operations uhci_debug_operations = {
#endif /* CONFIG_DEBUG_FS */
#else /* DEBUG || CONFIG_DYNAMIC_DEBUG*/
#else /* CONFIG_DYNAMIC_DEBUG*/
static inline void lprintk(char *buf)
{}

View File

@ -69,7 +69,7 @@ MODULE_PARM_DESC(ignore_oc, "ignore hardware overcurrent indications");
* show all queues in /sys/kernel/debug/uhci/[pci_addr]
* debug = 3, show all TDs in URBs when dumping
*/
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
#ifdef CONFIG_DYNAMIC_DEBUG
static int debug = 1;
module_param(debug, int, S_IRUGO | S_IWUSR);
@ -870,7 +870,7 @@ static int __init uhci_hcd_init(void)
ignore_oc ? ", overcurrent ignored" : "");
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);
if (!errbuf)
goto errbuf_failed;
@ -931,7 +931,7 @@ static void __exit uhci_hcd_cleanup(void)
#endif
kmem_cache_destroy(uhci_up_cachep);
debugfs_remove(uhci_debugfs_root);
#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
#ifdef CONFIG_DYNAMIC_DEBUG
kfree(errbuf);
#endif
clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded);