Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+8 -15
+8 -15
drivers/input/misc/atlas_btns.c
··· 21 21 * 22 22 */ 23 23 24 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 25 + 24 26 #include <linux/kernel.h> 25 27 #include <linux/module.h> 26 28 #include <linux/init.h> ··· 64 62 65 63 status = AE_OK; 66 64 } else { 67 - printk(KERN_WARNING "atlas: shrugged on unexpected function" 68 - ":function=%x,address=%lx,value=%x\n", 65 + pr_warn("shrugged on unexpected function: function=%x,address=%lx,value=%x\n", 69 66 function, (unsigned long)address, (u32)*value); 70 67 status = AE_BAD_PARAMETER; 71 68 } ··· 80 79 81 80 input_dev = input_allocate_device(); 82 81 if (!input_dev) { 83 - printk(KERN_ERR "atlas: unable to allocate input device\n"); 82 + pr_err("unable to allocate input device\n"); 84 83 return -ENOMEM; 85 84 } 86 85 ··· 103 102 104 103 err = input_register_device(input_dev); 105 104 if (err) { 106 - printk(KERN_ERR "atlas: couldn't register input device\n"); 105 + pr_err("couldn't register input device\n"); 107 106 input_free_device(input_dev); 108 107 return err; 109 108 } ··· 113 112 0x81, &acpi_atlas_button_handler, 114 113 &acpi_atlas_button_setup, device); 115 114 if (ACPI_FAILURE(status)) { 116 - printk(KERN_ERR "Atlas: Error installing addr spc handler\n"); 115 + pr_err("error installing addr spc handler\n"); 117 116 input_unregister_device(input_dev); 118 117 err = -EINVAL; 119 118 } ··· 128 127 status = acpi_remove_address_space_handler(device->handle, 129 128 0x81, &acpi_atlas_button_handler); 130 129 if (ACPI_FAILURE(status)) 131 - printk(KERN_ERR "Atlas: Error removing addr spc handler\n"); 130 + pr_err("error removing addr spc handler\n"); 132 131 133 132 input_unregister_device(input_dev); 134 133 ··· 154 153 155 154 static int __init atlas_acpi_init(void) 156 155 { 157 - int result; 158 - 159 156 if (acpi_disabled) 160 157 return -ENODEV; 161 158 162 - result = acpi_bus_register_driver(&atlas_acpi_driver); 163 - if (result < 0) { 164 - printk(KERN_ERR "Atlas ACPI: Unable to register driver\n"); 165 - return -ENODEV; 166 - } 167 - 168 - return 0; 159 + return acpi_bus_register_driver(&atlas_acpi_driver); 169 160 } 170 161 171 162 static void __exit atlas_acpi_exit(void)