diff options
author | Joe Perches <joe@perches.com> | 2010-01-26 06:40:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-27 00:15:56 -0500 |
commit | 99824461ea72ca0044cc6508f02c0e1cabf37ba5 (patch) | |
tree | 8672e525869778c9d4c12fe3982306387995bf2a /net/atm/resources.c | |
parent | b747caf365b4121903b26d1cd65454c7bc607184 (diff) |
net/atm: Convert printk to pr_<level>
Add #define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
Remove function names from output
Use single line pr_debug instead of broken multiple uses without newline
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm/resources.c')
-rw-r--r-- | net/atm/resources.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/net/atm/resources.c b/net/atm/resources.c index 56b7322ff461..0d4c0ee090db 100644 --- a/net/atm/resources.c +++ b/net/atm/resources.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * 2002/01 - don't free the whole struct sock on sk->destruct time, | 7 | * 2002/01 - don't free the whole struct sock on sk->destruct time, |
8 | * use the default destruct function initialized by sock_init_data */ | 8 | * use the default destruct function initialized by sock_init_data */ |
9 | 9 | ||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__ | ||
10 | 11 | ||
11 | #include <linux/ctype.h> | 12 | #include <linux/ctype.h> |
12 | #include <linux/string.h> | 13 | #include <linux/string.h> |
@@ -79,8 +80,7 @@ struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops, | |||
79 | 80 | ||
80 | dev = __alloc_atm_dev(type); | 81 | dev = __alloc_atm_dev(type); |
81 | if (!dev) { | 82 | if (!dev) { |
82 | printk(KERN_ERR "atm_dev_register: no space for dev %s\n", | 83 | pr_err("no space for dev %s\n", type); |
83 | type); | ||
84 | return NULL; | 84 | return NULL; |
85 | } | 85 | } |
86 | mutex_lock(&atm_dev_mutex); | 86 | mutex_lock(&atm_dev_mutex); |
@@ -109,16 +109,12 @@ struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops, | |||
109 | atomic_set(&dev->refcnt, 1); | 109 | atomic_set(&dev->refcnt, 1); |
110 | 110 | ||
111 | if (atm_proc_dev_register(dev) < 0) { | 111 | if (atm_proc_dev_register(dev) < 0) { |
112 | printk(KERN_ERR "atm_dev_register: " | 112 | pr_err("atm_proc_dev_register failed for dev %s\n", type); |
113 | "atm_proc_dev_register failed for dev %s\n", | ||
114 | type); | ||
115 | goto out_fail; | 113 | goto out_fail; |
116 | } | 114 | } |
117 | 115 | ||
118 | if (atm_register_sysfs(dev) < 0) { | 116 | if (atm_register_sysfs(dev) < 0) { |
119 | printk(KERN_ERR "atm_dev_register: " | 117 | pr_err("atm_register_sysfs failed for dev %s\n", type); |
120 | "atm_register_sysfs failed for dev %s\n", | ||
121 | type); | ||
122 | atm_proc_dev_deregister(dev); | 118 | atm_proc_dev_deregister(dev); |
123 | goto out_fail; | 119 | goto out_fail; |
124 | } | 120 | } |