aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJason Baron <jbaron@redhat.com>2011-10-04 17:13:22 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-18 14:22:01 -0400
commit0feefd97861f9b38accf09a12f8d323f2705e917 (patch)
treeae126a479effdf41d3995d82a8939c36d4511491 /lib
parent431625dac14de7152235f2f9934d70a9b0f9df83 (diff)
dynamic_debug: fix undefined reference to `__netdev_printk'
Dynamic debug recently added support for netdev_printk. It uses __netdev_printk() to support this functionality. However, when CONFIG_NET is not set, we get the following error: lib/built-in.o: In function `__dynamic_netdev_dbg': (.text+0x9fda): undefined reference to `__netdev_printk' Fix this by making the call to netdev_printk() contingent upon CONFIG_NET. We could have fixed this by defining netdev_printk() to a 'no-op' in the !CONFIG_NET case. However, this is not consistent with how the networking layer uses netdev_printk. For example, CONFIG_NET is not set, netdev_printk() does not have a 'no-op' definition defined. Signed-off-by: Jason Baron <jbaron@redhat.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/dynamic_debug.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index edec78052333..cb4b74548a3d 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -503,6 +503,8 @@ int __dynamic_dev_dbg(struct _ddebug *descriptor,
503} 503}
504EXPORT_SYMBOL(__dynamic_dev_dbg); 504EXPORT_SYMBOL(__dynamic_dev_dbg);
505 505
506#ifdef CONFIG_NET
507
506int __dynamic_netdev_dbg(struct _ddebug *descriptor, 508int __dynamic_netdev_dbg(struct _ddebug *descriptor,
507 const struct net_device *dev, const char *fmt, ...) 509 const struct net_device *dev, const char *fmt, ...)
508{ 510{
@@ -524,6 +526,8 @@ int __dynamic_netdev_dbg(struct _ddebug *descriptor,
524} 526}
525EXPORT_SYMBOL(__dynamic_netdev_dbg); 527EXPORT_SYMBOL(__dynamic_netdev_dbg);
526 528
529#endif
530
527static __initdata char ddebug_setup_string[1024]; 531static __initdata char ddebug_setup_string[1024];
528static __init int ddebug_setup_query(char *str) 532static __init int ddebug_setup_query(char *str)
529{ 533{