]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/device.h
driver core: basic infrastructure for per-module dynamic debug messages
[net-next-2.6.git] / include / linux / device.h
index 246937c9cbc780db2cc30b542453d401bcd6c334..fb034461b395c6da729eddf07c74da940d5dcaa9 100644 (file)
@@ -502,7 +502,6 @@ extern struct device *device_create(struct class *cls, struct device *parent,
                                    dev_t devt, void *drvdata,
                                    const char *fmt, ...)
                                    __attribute__((format(printf, 5, 6)));
-#define device_create_drvdata  device_create
 extern void device_destroy(struct class *cls, dev_t devt);
 
 /*
@@ -551,7 +550,11 @@ extern const char *dev_driver_string(const struct device *dev);
 #define dev_info(dev, format, arg...)          \
        dev_printk(KERN_INFO , dev , format , ## arg)
 
-#ifdef DEBUG
+#if defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
+#define dev_dbg(dev, format, ...) do { \
+       dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
+       } while (0)
+#elif defined(DEBUG)
 #define dev_dbg(dev, format, arg...)           \
        dev_printk(KERN_DEBUG , dev , format , ## arg)
 #else