[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1221697112-21814-8-git-send-email-yhlu.kernel@gmail.com>
Date: Wed, 17 Sep 2008 17:18:31 -0700
From: Yinghai Lu <yhlu.kernel@...il.com>
To: Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, Yinghai Lu <yhlu.kernel@...il.com>
Subject: [PATCH 7/7] pci: add KERN_PCI
use DEFINE_LOGLEVEL_SETUP to set loglevel for dev
so could use loglevel=4,dev:8 it will only print out info with dev_printk
Signed-off-by: Yinghai Lu <yhlu.kernel@...il.com>
---
drivers/base/core.c | 2 ++
include/linux/device.h | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
Index: linux-2.6/drivers/base/core.c
===================================================================
--- linux-2.6.orig/drivers/base/core.c
+++ linux-2.6/drivers/base/core.c
@@ -26,6 +26,8 @@
#include "base.h"
#include "power/power.h"
+DEFINE_LOGLEVEL_SETUP(dev, KERN_DEV, "dev:");
+
int (*platform_notify)(struct device *dev) = NULL;
int (*platform_notify_remove)(struct device *dev) = NULL;
static struct kobject *dev_kobj;
Index: linux-2.6/include/linux/device.h
===================================================================
--- linux-2.6.orig/include/linux/device.h
+++ linux-2.6/include/linux/device.h
@@ -518,10 +518,12 @@ extern void device_shutdown(void);
/* drivers/base/sys.c */
extern void sysdev_shutdown(void);
+#define KERN_DEV "<dev>"
+
/* debugging and troubleshooting/diagnostic helpers. */
extern const char *dev_driver_string(const struct device *dev);
#define dev_printk(level, dev, format, arg...) \
- printk(level "%s %s: " format , dev_driver_string(dev) , \
+ printk(level KERN_DEV "%s %s: " format , dev_driver_string(dev) , \
dev_name(dev) , ## arg)
#define dev_emerg(dev, format, arg...) \
@@ -538,6 +540,8 @@ extern const char *dev_driver_string(con
dev_printk(KERN_NOTICE , dev , format , ## arg)
#define dev_info(dev, format, arg...) \
dev_printk(KERN_INFO , dev , format , ## arg)
+#define dev_debug(dev, format, arg...) \
+ dev_printk(KERN_DEBUG , dev , format , ## arg)
#ifdef DEBUG
#define dev_dbg(dev, format, arg...) \
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists