pcmcia: use dynamic debug instead of custom infrastructure

Use the generic "dynamic debug" infrastructure instead of
CONIG_PCMCIA_DEBUG in the PCMCIA core (pcmcia.ko and pcmcia_core.ko). To
enable debugging, enable CONFIG_DYNAMIC_DEBUG, mount debugfs and

$ echo -n 'module pcmcia_core +p' > /sys/kernel/debug/dynamic_debug/control

for the complete module "pcmcia_core", for example. For more detailled
instructions, please see Documentation/dynamic-debug-howto.txt

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
Dominik Brodowski
2009-10-23 12:51:28 +02:00
parent 18a7a19b37
commit d50dbec3ce
7 changed files with 100 additions and 174 deletions

View File

@@ -107,28 +107,6 @@ static inline void cs_socket_put(struct pcmcia_socket *skt)
}
}
#ifdef CONFIG_PCMCIA_DEBUG
extern int cs_debug_level(int);
#define cs_dbg(skt, lvl, fmt, arg...) do { \
if (cs_debug_level(lvl)) \
dev_printk(KERN_DEBUG, &skt->dev, \
"cs: " fmt, ## arg); \
} while (0)
#define __cs_dbg(lvl, fmt, arg...) do { \
if (cs_debug_level(lvl)) \
printk(KERN_DEBUG \
"cs: " fmt, ## arg); \
} while (0)
#else
#define cs_dbg(skt, lvl, fmt, arg...) do { } while (0)
#define __cs_dbg(lvl, fmt, arg...) do { } while (0)
#endif
#define cs_err(skt, fmt, arg...) \
dev_printk(KERN_ERR, &skt->dev, "cs: " fmt, ## arg)
/*
* Stuff internal to module "pcmcia_core":