aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-30 02:33:07 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-12-01 02:10:26 -0500
commitda0c490115de026618a7fdcd886602da44392a50 (patch)
treeb61dae8d525fa765151adb8df5456a1e9880a773 /drivers/input
parent4eb3c30b2e034b673df3e8f21b497e39f3911a02 (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')
-rw-r--r--drivers/input/apm-power.c14
-rw-r--r--drivers/input/evbug.c18
-rw-r--r--drivers/input/evdev.c15
-rw-r--r--drivers/input/ff-core.c11
-rw-r--r--drivers/input/ff-memless.c31
-rw-r--r--drivers/input/input-polldev.c5
-rw-r--r--drivers/input/input.c22
-rw-r--r--drivers/input/joydev.c4
-rw-r--r--drivers/input/mousedev.c10
-rw-r--r--drivers/input/xen-kbdfront.c10
10 files changed, 72 insertions, 68 deletions
diff --git a/drivers/input/apm-power.c b/drivers/input/apm-power.c
index 7d61a9660806..e90ee3d30613 100644
--- a/drivers/input/apm-power.c
+++ b/drivers/input/apm-power.c
@@ -9,6 +9,8 @@
9 * 9 *
10 */ 10 */
11 11
12#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
13
12#include <linux/module.h> 14#include <linux/module.h>
13#include <linux/input.h> 15#include <linux/input.h>
14#include <linux/slab.h> 16#include <linux/slab.h>
@@ -23,8 +25,7 @@ static void system_power_event(unsigned int keycode)
23 switch (keycode) { 25 switch (keycode) {
24 case KEY_SUSPEND: 26 case KEY_SUSPEND:
25 apm_queue_event(APM_USER_SUSPEND); 27 apm_queue_event(APM_USER_SUSPEND);
26 28 pr_info("Requesting system suspend...\n");
27 printk(KERN_INFO "apm-power: Requesting system suspend...\n");
28 break; 29 break;
29 default: 30 default:
30 break; 31 break;
@@ -65,18 +66,15 @@ static int apmpower_connect(struct input_handler *handler,
65 66
66 error = input_register_handle(handle); 67 error = input_register_handle(handle);
67 if (error) { 68 if (error) {
68 printk(KERN_ERR 69 pr_err("Failed to register input power handler, error %d\n",
69 "apm-power: Failed to register input power handler, " 70 error);
70 "error %d\n", error);
71 kfree(handle); 71 kfree(handle);
72 return error; 72 return error;
73 } 73 }
74 74
75 error = input_open_device(handle); 75 error = input_open_device(handle);
76 if (error) { 76 if (error) {
77 printk(KERN_ERR 77 pr_err("Failed to open input power device, error %d\n", error);
78 "apm-power: Failed to open input power device, "
79 "error %d\n", error);
80 input_unregister_handle(handle); 78 input_unregister_handle(handle);
81 kfree(handle); 79 kfree(handle);
82 return error; 80 return error;
diff --git a/drivers/input/evbug.c b/drivers/input/evbug.c
index f7c5c14ec12a..cd4e6679d61a 100644
--- a/drivers/input/evbug.c
+++ b/drivers/input/evbug.c
@@ -26,6 +26,8 @@
26 * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic 26 * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
27 */ 27 */
28 28
29#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
30
29#include <linux/slab.h> 31#include <linux/slab.h>
30#include <linux/module.h> 32#include <linux/module.h>
31#include <linux/input.h> 33#include <linux/input.h>
@@ -38,8 +40,8 @@ MODULE_LICENSE("GPL");
38 40
39static void evbug_event(struct input_handle *handle, unsigned int type, unsigned int code, int value) 41static void evbug_event(struct input_handle *handle, unsigned int type, unsigned int code, int value)
40{ 42{
41 printk(KERN_DEBUG "evbug.c: Event. Dev: %s, Type: %d, Code: %d, Value: %d\n", 43 printk(KERN_DEBUG pr_fmt("Event. Dev: %s, Type: %d, Code: %d, Value: %d\n"),
42 dev_name(&handle->dev->dev), type, code, value); 44 dev_name(&handle->dev->dev), type, code, value);
43} 45}
44 46
45static int evbug_connect(struct input_handler *handler, struct input_dev *dev, 47static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
@@ -64,10 +66,10 @@ static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
64 if (error) 66 if (error)
65 goto err_unregister_handle; 67 goto err_unregister_handle;
66 68
67 printk(KERN_DEBUG "evbug.c: Connected device: %s (%s at %s)\n", 69 printk(KERN_DEBUG pr_fmt("Connected device: %s (%s at %s)\n"),
68 dev_name(&dev->dev), 70 dev_name(&dev->dev),
69 dev->name ?: "unknown", 71 dev->name ?: "unknown",
70 dev->phys ?: "unknown"); 72 dev->phys ?: "unknown");
71 73
72 return 0; 74 return 0;
73 75
@@ -80,8 +82,8 @@ static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
80 82
81static void evbug_disconnect(struct input_handle *handle) 83static void evbug_disconnect(struct input_handle *handle)
82{ 84{
83 printk(KERN_DEBUG "evbug.c: Disconnected device: %s\n", 85 printk(KERN_DEBUG pr_fmt("Disconnected device: %s\n"),
84 dev_name(&handle->dev->dev)); 86 dev_name(&handle->dev->dev));
85 87
86 input_close_device(handle); 88 input_close_device(handle);
87 input_unregister_handle(handle); 89 input_unregister_handle(handle);
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index e3f7fc6f9565..17660b1c8591 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -8,6 +8,8 @@
8 * the Free Software Foundation. 8 * the Free Software Foundation.
9 */ 9 */
10 10
11#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
12
11#define EVDEV_MINOR_BASE 64 13#define EVDEV_MINOR_BASE 64
12#define EVDEV_MINORS 32 14#define EVDEV_MINORS 32
13#define EVDEV_MIN_BUFFER_SIZE 64U 15#define EVDEV_MIN_BUFFER_SIZE 64U
@@ -522,12 +524,11 @@ static int handle_eviocgbit(struct input_dev *dev,
522 if (type == EV_KEY && size == OLD_KEY_MAX) { 524 if (type == EV_KEY && size == OLD_KEY_MAX) {
523 len = OLD_KEY_MAX; 525 len = OLD_KEY_MAX;
524 if (printk_timed_ratelimit(&keymax_warn_time, 10 * 1000)) 526 if (printk_timed_ratelimit(&keymax_warn_time, 10 * 1000))
525 printk(KERN_WARNING 527 pr_warning("(EVIOCGBIT): Suspicious buffer size %u, "
526 "evdev.c(EVIOCGBIT): Suspicious buffer size %u, " 528 "limiting output to %zu bytes. See "
527 "limiting output to %zu bytes. See " 529 "http://userweb.kernel.org/~dtor/eviocgbit-bug.html\n",
528 "http://userweb.kernel.org/~dtor/eviocgbit-bug.html\n", 530 OLD_KEY_MAX,
529 OLD_KEY_MAX, 531 BITS_TO_LONGS(OLD_KEY_MAX) * sizeof(long));
530 BITS_TO_LONGS(OLD_KEY_MAX) * sizeof(long));
531 } 532 }
532 533
533 return bits_to_user(bits, len, size, p, compat_mode); 534 return bits_to_user(bits, len, size, p, compat_mode);
@@ -894,7 +895,7 @@ static int evdev_connect(struct input_handler *handler, struct input_dev *dev,
894 break; 895 break;
895 896
896 if (minor == EVDEV_MINORS) { 897 if (minor == EVDEV_MINORS) {
897 printk(KERN_ERR "evdev: no more free evdev devices\n"); 898 pr_err("no more free evdev devices\n");
898 return -ENFILE; 899 return -ENFILE;
899 } 900 }
900 901
diff --git a/drivers/input/ff-core.c b/drivers/input/ff-core.c
index 03078c08309a..3367f760d75a 100644
--- a/drivers/input/ff-core.c
+++ b/drivers/input/ff-core.c
@@ -23,7 +23,7 @@
23 23
24/* #define DEBUG */ 24/* #define DEBUG */
25 25
26#define debug(format, arg...) pr_debug("ff-core: " format "\n", ## arg) 26#define pr_fmt(fmt) KBUILD_BASENAME ": " fmt
27 27
28#include <linux/input.h> 28#include <linux/input.h>
29#include <linux/module.h> 29#include <linux/module.h>
@@ -116,7 +116,7 @@ int input_ff_upload(struct input_dev *dev, struct ff_effect *effect,
116 116
117 if (effect->type < FF_EFFECT_MIN || effect->type > FF_EFFECT_MAX || 117 if (effect->type < FF_EFFECT_MIN || effect->type > FF_EFFECT_MAX ||
118 !test_bit(effect->type, dev->ffbit)) { 118 !test_bit(effect->type, dev->ffbit)) {
119 debug("invalid or not supported effect type in upload"); 119 pr_debug("invalid or not supported effect type in upload\n");
120 return -EINVAL; 120 return -EINVAL;
121 } 121 }
122 122
@@ -124,7 +124,7 @@ int input_ff_upload(struct input_dev *dev, struct ff_effect *effect,
124 (effect->u.periodic.waveform < FF_WAVEFORM_MIN || 124 (effect->u.periodic.waveform < FF_WAVEFORM_MIN ||
125 effect->u.periodic.waveform > FF_WAVEFORM_MAX || 125 effect->u.periodic.waveform > FF_WAVEFORM_MAX ||
126 !test_bit(effect->u.periodic.waveform, dev->ffbit))) { 126 !test_bit(effect->u.periodic.waveform, dev->ffbit))) {
127 debug("invalid or not supported wave form in upload"); 127 pr_debug("invalid or not supported wave form in upload\n");
128 return -EINVAL; 128 return -EINVAL;
129 } 129 }
130 130
@@ -246,7 +246,7 @@ static int flush_effects(struct input_dev *dev, struct file *file)
246 struct ff_device *ff = dev->ff; 246 struct ff_device *ff = dev->ff;
247 int i; 247 int i;
248 248
249 debug("flushing now"); 249 pr_debug("flushing now\n");
250 250
251 mutex_lock(&ff->mutex); 251 mutex_lock(&ff->mutex);
252 252
@@ -315,8 +315,7 @@ int input_ff_create(struct input_dev *dev, int max_effects)
315 int i; 315 int i;
316 316
317 if (!max_effects) { 317 if (!max_effects) {
318 printk(KERN_ERR 318 pr_err("cannot allocate device without any effects\n");
319 "ff-core: cannot allocate device without any effects\n");
320 return -EINVAL; 319 return -EINVAL;
321 } 320 }
322 321
diff --git a/drivers/input/ff-memless.c b/drivers/input/ff-memless.c
index 1d881c96ba8f..117a59aaa70e 100644
--- a/drivers/input/ff-memless.c
+++ b/drivers/input/ff-memless.c
@@ -23,7 +23,7 @@
23 23
24/* #define DEBUG */ 24/* #define DEBUG */
25 25
26#define debug(format, arg...) pr_debug("ff-memless: " format "\n", ## arg) 26#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
27 27
28#include <linux/slab.h> 28#include <linux/slab.h>
29#include <linux/input.h> 29#include <linux/input.h>
@@ -129,7 +129,7 @@ static void ml_schedule_timer(struct ml_device *ml)
129 int events = 0; 129 int events = 0;
130 int i; 130 int i;
131 131
132 debug("calculating next timer"); 132 pr_debug("calculating next timer\n");
133 133
134 for (i = 0; i < FF_MEMLESS_EFFECTS; i++) { 134 for (i = 0; i < FF_MEMLESS_EFFECTS; i++) {
135 135
@@ -149,10 +149,10 @@ static void ml_schedule_timer(struct ml_device *ml)
149 } 149 }
150 150
151 if (!events) { 151 if (!events) {
152 debug("no actions"); 152 pr_debug("no actions\n");
153 del_timer(&ml->timer); 153 del_timer(&ml->timer);
154 } else { 154 } else {
155 debug("timer set"); 155 pr_debug("timer set\n");
156 mod_timer(&ml->timer, earliest); 156 mod_timer(&ml->timer, earliest);
157 } 157 }
158} 158}
@@ -173,8 +173,8 @@ static int apply_envelope(struct ml_effect_state *state, int value,
173 if (envelope->attack_length && 173 if (envelope->attack_length &&
174 time_before(now, 174 time_before(now,
175 state->play_at + msecs_to_jiffies(envelope->attack_length))) { 175 state->play_at + msecs_to_jiffies(envelope->attack_length))) {
176 debug("value = 0x%x, attack_level = 0x%x", value, 176 pr_debug("value = 0x%x, attack_level = 0x%x\n",
177 envelope->attack_level); 177 value, envelope->attack_level);
178 time_from_level = jiffies_to_msecs(now - state->play_at); 178 time_from_level = jiffies_to_msecs(now - state->play_at);
179 time_of_envelope = envelope->attack_length; 179 time_of_envelope = envelope->attack_length;
180 envelope_level = min_t(__s16, envelope->attack_level, 0x7fff); 180 envelope_level = min_t(__s16, envelope->attack_level, 0x7fff);
@@ -191,13 +191,13 @@ static int apply_envelope(struct ml_effect_state *state, int value,
191 191
192 difference = abs(value) - envelope_level; 192 difference = abs(value) - envelope_level;
193 193
194 debug("difference = %d", difference); 194 pr_debug("difference = %d\n", difference);
195 debug("time_from_level = 0x%x", time_from_level); 195 pr_debug("time_from_level = 0x%x\n", time_from_level);
196 debug("time_of_envelope = 0x%x", time_of_envelope); 196 pr_debug("time_of_envelope = 0x%x\n", time_of_envelope);
197 197
198 difference = difference * time_from_level / time_of_envelope; 198 difference = difference * time_from_level / time_of_envelope;
199 199
200 debug("difference = %d", difference); 200 pr_debug("difference = %d\n", difference);
201 201
202 return value < 0 ? 202 return value < 0 ?
203 -(difference + envelope_level) : (difference + envelope_level); 203 -(difference + envelope_level) : (difference + envelope_level);
@@ -215,8 +215,7 @@ static int get_compatible_type(struct ff_device *ff, int effect_type)
215 if (effect_type == FF_PERIODIC && test_bit(FF_RUMBLE, ff->ffbit)) 215 if (effect_type == FF_PERIODIC && test_bit(FF_RUMBLE, ff->ffbit))
216 return FF_RUMBLE; 216 return FF_RUMBLE;
217 217
218 printk(KERN_ERR 218 pr_err("invalid type in get_compatible_type()\n");
219 "ff-memless: invalid type in get_compatible_type()\n");
220 219
221 return 0; 220 return 0;
222} 221}
@@ -312,7 +311,7 @@ static void ml_combine_effects(struct ff_effect *effect,
312 break; 311 break;
313 312
314 default: 313 default:
315 printk(KERN_ERR "ff-memless: invalid type in ml_combine_effects()\n"); 314 pr_err("invalid type in ml_combine_effects()\n");
316 break; 315 break;
317 } 316 }
318 317
@@ -406,7 +405,7 @@ static void ml_effect_timer(unsigned long timer_data)
406 struct ml_device *ml = dev->ff->private; 405 struct ml_device *ml = dev->ff->private;
407 unsigned long flags; 406 unsigned long flags;
408 407
409 debug("timer: updating effects"); 408 pr_debug("timer: updating effects\n");
410 409
411 spin_lock_irqsave(&dev->event_lock, flags); 410 spin_lock_irqsave(&dev->event_lock, flags);
412 ml_play_effects(ml); 411 ml_play_effects(ml);
@@ -438,7 +437,7 @@ static int ml_ff_playback(struct input_dev *dev, int effect_id, int value)
438 struct ml_effect_state *state = &ml->states[effect_id]; 437 struct ml_effect_state *state = &ml->states[effect_id];
439 438
440 if (value > 0) { 439 if (value > 0) {
441 debug("initiated play"); 440 pr_debug("initiated play\n");
442 441
443 __set_bit(FF_EFFECT_STARTED, &state->flags); 442 __set_bit(FF_EFFECT_STARTED, &state->flags);
444 state->count = value; 443 state->count = value;
@@ -449,7 +448,7 @@ static int ml_ff_playback(struct input_dev *dev, int effect_id, int value)
449 state->adj_at = state->play_at; 448 state->adj_at = state->play_at;
450 449
451 } else { 450 } else {
452 debug("initiated stop"); 451 pr_debug("initiated stop\n");
453 452
454 if (test_bit(FF_EFFECT_PLAYING, &state->flags)) 453 if (test_bit(FF_EFFECT_PLAYING, &state->flags))
455 __set_bit(FF_EFFECT_ABORTING, &state->flags); 454 __set_bit(FF_EFFECT_ABORTING, &state->flags);
diff --git a/drivers/input/input-polldev.c b/drivers/input/input-polldev.c
index 10c9b0a845f0..0559e309bac9 100644
--- a/drivers/input/input-polldev.c
+++ b/drivers/input/input-polldev.c
@@ -8,6 +8,8 @@
8 * the Free Software Foundation. 8 * the Free Software Foundation.
9 */ 9 */
10 10
11#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
12
11#include <linux/jiffies.h> 13#include <linux/jiffies.h>
12#include <linux/slab.h> 14#include <linux/slab.h>
13#include <linux/mutex.h> 15#include <linux/mutex.h>
@@ -33,8 +35,7 @@ static int input_polldev_start_workqueue(void)
33 if (!polldev_users) { 35 if (!polldev_users) {
34 polldev_wq = create_singlethread_workqueue("ipolldevd"); 36 polldev_wq = create_singlethread_workqueue("ipolldevd");
35 if (!polldev_wq) { 37 if (!polldev_wq) {
36 printk(KERN_ERR "input-polldev: failed to create " 38 pr_err("failed to create ipolldevd workqueue\n");
37 "ipolldevd workqueue\n");
38 retval = -ENOMEM; 39 retval = -ENOMEM;
39 goto out; 40 goto out;
40 } 41 }
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
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index 9d424cebfd2c..3182c9cd1b0e 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -10,6 +10,8 @@
10 * (at your option) any later version. 10 * (at your option) any later version.
11 */ 11 */
12 12
13#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
14
13#include <asm/io.h> 15#include <asm/io.h>
14#include <asm/system.h> 16#include <asm/system.h>
15#include <linux/delay.h> 17#include <linux/delay.h>
@@ -806,7 +808,7 @@ static int joydev_connect(struct input_handler *handler, struct input_dev *dev,
806 break; 808 break;
807 809
808 if (minor == JOYDEV_MINORS) { 810 if (minor == JOYDEV_MINORS) {
809 printk(KERN_ERR "joydev: no more free joydev devices\n"); 811 pr_err("no more free joydev devices\n");
810 return -ENFILE; 812 return -ENFILE;
811 } 813 }
812 814
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index 2a00ddf4f23a..7630273e9474 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -9,6 +9,8 @@
9 * the Free Software Foundation. 9 * the Free Software Foundation.
10 */ 10 */
11 11
12#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
13
12#define MOUSEDEV_MINOR_BASE 32 14#define MOUSEDEV_MINOR_BASE 32
13#define MOUSEDEV_MINORS 32 15#define MOUSEDEV_MINORS 32
14#define MOUSEDEV_MIX 31 16#define MOUSEDEV_MIX 31
@@ -977,7 +979,7 @@ static int mousedev_connect(struct input_handler *handler,
977 break; 979 break;
978 980
979 if (minor == MOUSEDEV_MINORS) { 981 if (minor == MOUSEDEV_MINORS) {
980 printk(KERN_ERR "mousedev: no more free mousedev devices\n"); 982 pr_err("no more free mousedev devices\n");
981 return -ENFILE; 983 return -ENFILE;
982 } 984 }
983 985
@@ -1087,13 +1089,13 @@ static int __init mousedev_init(void)
1087#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX 1089#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
1088 error = misc_register(&psaux_mouse); 1090 error = misc_register(&psaux_mouse);
1089 if (error) 1091 if (error)
1090 printk(KERN_WARNING "mice: could not register psaux device, " 1092 pr_warning("could not register psaux device, error: %d\n",
1091 "error: %d\n", error); 1093 error);
1092 else 1094 else
1093 psaux_registered = 1; 1095 psaux_registered = 1;
1094#endif 1096#endif
1095 1097
1096 printk(KERN_INFO "mice: PS/2 mouse device common for all mice\n"); 1098 pr_info("PS/2 mouse device common for all mice\n");
1097 1099
1098 return 0; 1100 return 0;
1099} 1101}
diff --git a/drivers/input/xen-kbdfront.c b/drivers/input/xen-kbdfront.c
index e0c024db2ca5..7f85a862ad11 100644
--- a/drivers/input/xen-kbdfront.c
+++ b/drivers/input/xen-kbdfront.c
@@ -17,6 +17,8 @@
17 * Switch to grant tables together with xen-fbfront.c. 17 * Switch to grant tables together with xen-fbfront.c.
18 */ 18 */
19 19
20#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
21
20#include <linux/kernel.h> 22#include <linux/kernel.h>
21#include <linux/errno.h> 23#include <linux/errno.h>
22#include <linux/module.h> 24#include <linux/module.h>
@@ -84,9 +86,8 @@ static irqreturn_t input_handler(int rq, void *dev_id)
84 input_report_key(dev, event->key.keycode, 86 input_report_key(dev, event->key.keycode,
85 event->key.pressed); 87 event->key.pressed);
86 else 88 else
87 printk(KERN_WARNING 89 pr_warning("unhandled keycode 0x%x\n",
88 "xenkbd: unhandled keycode 0x%x\n", 90 event->key.keycode);
89 event->key.keycode);
90 break; 91 break;
91 case XENKBD_TYPE_POS: 92 case XENKBD_TYPE_POS:
92 input_report_abs(dev, ABS_X, event->pos.abs_x); 93 input_report_abs(dev, ABS_X, event->pos.abs_x);
@@ -292,8 +293,7 @@ InitWait:
292 ret = xenbus_printf(XBT_NIL, info->xbdev->nodename, 293 ret = xenbus_printf(XBT_NIL, info->xbdev->nodename,
293 "request-abs-pointer", "1"); 294 "request-abs-pointer", "1");
294 if (ret) 295 if (ret)
295 printk(KERN_WARNING 296 pr_warning("can't request abs-pointer\n");
296 "xenkbd: can't request abs-pointer");
297 } 297 }
298 xenbus_switch_state(dev, XenbusStateConnected); 298 xenbus_switch_state(dev, XenbusStateConnected);
299 break; 299 break;