diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-07-13 12:33:20 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-07-13 12:43:24 -0400 |
commit | bf77499faa1c566ccfb1bbb3a85ae5eb5ca926c6 (patch) | |
tree | 3dd3cb261e15c86ec5081480ba8de4b5f9148dfa /drivers | |
parent | 02b5fac1f71c21a84da025973ccb14e4ec6f6d4a (diff) |
Input: atlas_btns - switch to using pr_err() and friends
This ensures consistent prefixes on all messages emitted by the
driver.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/misc/atlas_btns.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/drivers/input/misc/atlas_btns.c b/drivers/input/misc/atlas_btns.c index 2391a86aeb0f..601f7372f9c4 100644 --- a/drivers/input/misc/atlas_btns.c +++ b/drivers/input/misc/atlas_btns.c | |||
@@ -21,6 +21,8 @@ | |||
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
25 | |||
24 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 27 | #include <linux/module.h> |
26 | #include <linux/init.h> | 28 | #include <linux/init.h> |
@@ -62,8 +64,7 @@ static acpi_status acpi_atlas_button_handler(u32 function, | |||
62 | 64 | ||
63 | status = AE_OK; | 65 | status = AE_OK; |
64 | } else { | 66 | } else { |
65 | printk(KERN_WARNING "atlas: shrugged on unexpected function" | 67 | pr_warn("shrugged on unexpected function: function=%x,address=%lx,value=%x\n", |
66 | ":function=%x,address=%lx,value=%x\n", | ||
67 | function, (unsigned long)address, (u32)*value); | 68 | function, (unsigned long)address, (u32)*value); |
68 | status = AE_BAD_PARAMETER; | 69 | status = AE_BAD_PARAMETER; |
69 | } | 70 | } |
@@ -79,7 +80,7 @@ static int atlas_acpi_button_add(struct acpi_device *device) | |||
79 | 80 | ||
80 | input_dev = input_allocate_device(); | 81 | input_dev = input_allocate_device(); |
81 | if (!input_dev) { | 82 | if (!input_dev) { |
82 | printk(KERN_ERR "atlas: unable to allocate input device\n"); | 83 | pr_err("unable to allocate input device\n"); |
83 | return -ENOMEM; | 84 | return -ENOMEM; |
84 | } | 85 | } |
85 | 86 | ||
@@ -102,7 +103,7 @@ static int atlas_acpi_button_add(struct acpi_device *device) | |||
102 | 103 | ||
103 | err = input_register_device(input_dev); | 104 | err = input_register_device(input_dev); |
104 | if (err) { | 105 | if (err) { |
105 | printk(KERN_ERR "atlas: couldn't register input device\n"); | 106 | pr_err("couldn't register input device\n"); |
106 | input_free_device(input_dev); | 107 | input_free_device(input_dev); |
107 | return err; | 108 | return err; |
108 | } | 109 | } |
@@ -112,7 +113,7 @@ static int atlas_acpi_button_add(struct acpi_device *device) | |||
112 | 0x81, &acpi_atlas_button_handler, | 113 | 0x81, &acpi_atlas_button_handler, |
113 | &acpi_atlas_button_setup, device); | 114 | &acpi_atlas_button_setup, device); |
114 | if (ACPI_FAILURE(status)) { | 115 | if (ACPI_FAILURE(status)) { |
115 | printk(KERN_ERR "Atlas: Error installing addr spc handler\n"); | 116 | pr_err("error installing addr spc handler\n"); |
116 | input_unregister_device(input_dev); | 117 | input_unregister_device(input_dev); |
117 | err = -EINVAL; | 118 | err = -EINVAL; |
118 | } | 119 | } |
@@ -127,7 +128,7 @@ static int atlas_acpi_button_remove(struct acpi_device *device, int type) | |||
127 | status = acpi_remove_address_space_handler(device->handle, | 128 | status = acpi_remove_address_space_handler(device->handle, |
128 | 0x81, &acpi_atlas_button_handler); | 129 | 0x81, &acpi_atlas_button_handler); |
129 | if (ACPI_FAILURE(status)) | 130 | if (ACPI_FAILURE(status)) |
130 | printk(KERN_ERR "Atlas: Error removing addr spc handler\n"); | 131 | pr_err("error removing addr spc handler\n"); |
131 | 132 | ||
132 | input_unregister_device(input_dev); | 133 | input_unregister_device(input_dev); |
133 | 134 | ||
@@ -153,18 +154,10 @@ static struct acpi_driver atlas_acpi_driver = { | |||
153 | 154 | ||
154 | static int __init atlas_acpi_init(void) | 155 | static int __init atlas_acpi_init(void) |
155 | { | 156 | { |
156 | int result; | ||
157 | |||
158 | if (acpi_disabled) | 157 | if (acpi_disabled) |
159 | return -ENODEV; | 158 | return -ENODEV; |
160 | 159 | ||
161 | result = acpi_bus_register_driver(&atlas_acpi_driver); | 160 | return acpi_bus_register_driver(&atlas_acpi_driver); |
162 | if (result < 0) { | ||
163 | printk(KERN_ERR "Atlas ACPI: Unable to register driver\n"); | ||
164 | return -ENODEV; | ||
165 | } | ||
166 | |||
167 | return 0; | ||
168 | } | 161 | } |
169 | 162 | ||
170 | static void __exit atlas_acpi_exit(void) | 163 | static void __exit atlas_acpi_exit(void) |