public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bluetooth: properly use pr_fmt() on lib.c
@ 2012-04-24  2:45 Luis R. Rodriguez
  2012-04-24  4:16 ` Gustavo Padovan
  0 siblings, 1 reply; 3+ messages in thread
From: Luis R. Rodriguez @ 2012-04-24  2:45 UTC (permalink / raw)
  To: marcel, gustavo, johan.hedberg
  Cc: linville, linux-bluetooth, Luis R. Rodriguez

From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>

pr_fmt() is either defined or we redefine it. Typically
drivers define it prior to including printk.h but this
is done under the assumption that no other subsystem
it uses has already defined pr_fmt(). In such cases
pr_fmt() should be undefined and redefined.

Doing this properly shaves down compilation time quite
considerably.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
 net/bluetooth/lib.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c
index 5066288..84ff96f 100644
--- a/net/bluetooth/lib.c
+++ b/net/bluetooth/lib.c
@@ -24,11 +24,13 @@
 
 /* Bluetooth kernel library. */
 
+#undef pr_fmt
 #define pr_fmt(fmt) "Bluetooth: " fmt
 
 #include <linux/module.h>
 
 #include <linux/kernel.h>
+#include <linux/printk.h>
 #include <linux/stddef.h>
 #include <linux/string.h>
 #include <asm/errno.h>
-- 
1.7.10.rc1.22.gf5241

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-24  8:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-24  2:45 [PATCH] bluetooth: properly use pr_fmt() on lib.c Luis R. Rodriguez
2012-04-24  4:16 ` Gustavo Padovan
2012-04-24  8:06   ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox