diff options
author | Joe Perches <joe@perches.com> | 2010-11-30 02:33:07 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-12-01 02:10:26 -0500 |
commit | da0c490115de026618a7fdcd886602da44392a50 (patch) | |
tree | b61dae8d525fa765151adb8df5456a1e9880a773 /drivers/input/input.c | |
parent | 4eb3c30b2e034b673df3e8f21b497e39f3911a02 (diff) |
Input: use pr_fmt and pr_<level>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r-- | drivers/input/input.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index 7f26ca6ecf75..c7a1e826c580 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -10,6 +10,8 @@ | |||
10 | * the Free Software Foundation. | 10 | * the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #define pr_fmt(fmt) KBUILD_BASENAME ": " fmt | ||
14 | |||
13 | #include <linux/init.h> | 15 | #include <linux/init.h> |
14 | #include <linux/types.h> | 16 | #include <linux/types.h> |
15 | #include <linux/input.h> | 17 | #include <linux/input.h> |
@@ -959,10 +961,8 @@ static int input_attach_handler(struct input_dev *dev, struct input_handler *han | |||
959 | 961 | ||
960 | error = handler->connect(handler, dev, id); | 962 | error = handler->connect(handler, dev, id); |
961 | if (error && error != -ENODEV) | 963 | if (error && error != -ENODEV) |
962 | printk(KERN_ERR | 964 | pr_err("failed to attach handler %s to device %s, error: %d\n", |
963 | "input: failed to attach handler %s to device %s, " | 965 | handler->name, kobject_name(&dev->dev.kobj), error); |
964 | "error: %d\n", | ||
965 | handler->name, kobject_name(&dev->dev.kobj), error); | ||
966 | 966 | ||
967 | return error; | 967 | return error; |
968 | } | 968 | } |
@@ -1820,9 +1820,8 @@ void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int | |||
1820 | break; | 1820 | break; |
1821 | 1821 | ||
1822 | default: | 1822 | default: |
1823 | printk(KERN_ERR | 1823 | pr_err("input_set_capability: unknown type %u (code %u)\n", |
1824 | "input_set_capability: unknown type %u (code %u)\n", | 1824 | type, code); |
1825 | type, code); | ||
1826 | dump_stack(); | 1825 | dump_stack(); |
1827 | return; | 1826 | return; |
1828 | } | 1827 | } |
@@ -1904,8 +1903,9 @@ int input_register_device(struct input_dev *dev) | |||
1904 | return error; | 1903 | return error; |
1905 | 1904 | ||
1906 | path = kobject_get_path(&dev->dev.kobj, GFP_KERNEL); | 1905 | path = kobject_get_path(&dev->dev.kobj, GFP_KERNEL); |
1907 | printk(KERN_INFO "input: %s as %s\n", | 1906 | pr_info("%s as %s\n", |
1908 | dev->name ? dev->name : "Unspecified device", path ? path : "N/A"); | 1907 | dev->name ? dev->name : "Unspecified device", |
1908 | path ? path : "N/A"); | ||
1909 | kfree(path); | 1909 | kfree(path); |
1910 | 1910 | ||
1911 | error = mutex_lock_interruptible(&input_mutex); | 1911 | error = mutex_lock_interruptible(&input_mutex); |
@@ -2187,7 +2187,7 @@ static int __init input_init(void) | |||
2187 | 2187 | ||
2188 | err = class_register(&input_class); | 2188 | err = class_register(&input_class); |
2189 | if (err) { | 2189 | if (err) { |
2190 | printk(KERN_ERR "input: unable to register input_dev class\n"); | 2190 | pr_err("unable to register input_dev class\n"); |
2191 | return err; | 2191 | return err; |
2192 | } | 2192 | } |
2193 | 2193 | ||
@@ -2197,7 +2197,7 @@ static int __init input_init(void) | |||
2197 | 2197 | ||
2198 | err = register_chrdev(INPUT_MAJOR, "input", &input_fops); | 2198 | err = register_chrdev(INPUT_MAJOR, "input", &input_fops); |
2199 | if (err) { | 2199 | if (err) { |
2200 | printk(KERN_ERR "input: unable to register char major %d", INPUT_MAJOR); | 2200 | pr_err("unable to register char major %d", INPUT_MAJOR); |
2201 | goto fail2; | 2201 | goto fail2; |
2202 | } | 2202 | } |
2203 | 2203 | ||