aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/apm-power.c
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/apm-power.c
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/apm-power.c')
-rw-r--r--drivers/input/apm-power.c14
1 files changed, 6 insertions, 8 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;