aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/platform/x86/asus-laptop.c34
-rw-r--r--drivers/platform/x86/asus-wmi.c20
-rw-r--r--drivers/platform/x86/asus_acpi.c77
3 files changed, 59 insertions, 72 deletions
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index c53b3ff7978a..d65df92e2acc 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -318,7 +318,7 @@ static int acpi_check_handle(acpi_handle handle, const char *method,
318 318
319 if (status != AE_OK) { 319 if (status != AE_OK) {
320 if (ret) 320 if (ret)
321 pr_warning("Error finding %s\n", method); 321 pr_warn("Error finding %s\n", method);
322 return -ENODEV; 322 return -ENODEV;
323 } 323 }
324 return 0; 324 return 0;
@@ -383,7 +383,7 @@ static int asus_kled_lvl(struct asus_laptop *asus)
383 rv = acpi_evaluate_integer(asus->handle, METHOD_KBD_LIGHT_GET, 383 rv = acpi_evaluate_integer(asus->handle, METHOD_KBD_LIGHT_GET,
384 &params, &kblv); 384 &params, &kblv);
385 if (ACPI_FAILURE(rv)) { 385 if (ACPI_FAILURE(rv)) {
386 pr_warning("Error reading kled level\n"); 386 pr_warn("Error reading kled level\n");
387 return -ENODEV; 387 return -ENODEV;
388 } 388 }
389 return kblv; 389 return kblv;
@@ -397,7 +397,7 @@ static int asus_kled_set(struct asus_laptop *asus, int kblv)
397 kblv = 0; 397 kblv = 0;
398 398
399 if (write_acpi_int(asus->handle, METHOD_KBD_LIGHT_SET, kblv)) { 399 if (write_acpi_int(asus->handle, METHOD_KBD_LIGHT_SET, kblv)) {
400 pr_warning("Keyboard LED display write failed\n"); 400 pr_warn("Keyboard LED display write failed\n");
401 return -EINVAL; 401 return -EINVAL;
402 } 402 }
403 return 0; 403 return 0;
@@ -531,7 +531,7 @@ static int asus_read_brightness(struct backlight_device *bd)
531 rv = acpi_evaluate_integer(asus->handle, METHOD_BRIGHTNESS_GET, 531 rv = acpi_evaluate_integer(asus->handle, METHOD_BRIGHTNESS_GET,
532 NULL, &value); 532 NULL, &value);
533 if (ACPI_FAILURE(rv)) 533 if (ACPI_FAILURE(rv))
534 pr_warning("Error reading brightness\n"); 534 pr_warn("Error reading brightness\n");
535 535
536 return value; 536 return value;
537} 537}
@@ -541,7 +541,7 @@ static int asus_set_brightness(struct backlight_device *bd, int value)
541 struct asus_laptop *asus = bl_get_data(bd); 541 struct asus_laptop *asus = bl_get_data(bd);
542 542
543 if (write_acpi_int(asus->handle, METHOD_BRIGHTNESS_SET, value)) { 543 if (write_acpi_int(asus->handle, METHOD_BRIGHTNESS_SET, value)) {
544 pr_warning("Error changing brightness\n"); 544 pr_warn("Error changing brightness\n");
545 return -EIO; 545 return -EIO;
546 } 546 }
547 return 0; 547 return 0;
@@ -730,7 +730,7 @@ static ssize_t store_ledd(struct device *dev, struct device_attribute *attr,
730 rv = parse_arg(buf, count, &value); 730 rv = parse_arg(buf, count, &value);
731 if (rv > 0) { 731 if (rv > 0) {
732 if (write_acpi_int(asus->handle, METHOD_LEDD, value)) { 732 if (write_acpi_int(asus->handle, METHOD_LEDD, value)) {
733 pr_warning("LED display write failed\n"); 733 pr_warn("LED display write failed\n");
734 return -ENODEV; 734 return -ENODEV;
735 } 735 }
736 asus->ledd_status = (u32) value; 736 asus->ledd_status = (u32) value;
@@ -752,7 +752,7 @@ static int asus_wireless_status(struct asus_laptop *asus, int mask)
752 rv = acpi_evaluate_integer(asus->handle, METHOD_WL_STATUS, 752 rv = acpi_evaluate_integer(asus->handle, METHOD_WL_STATUS,
753 NULL, &status); 753 NULL, &status);
754 if (ACPI_FAILURE(rv)) { 754 if (ACPI_FAILURE(rv)) {
755 pr_warning("Error reading Wireless status\n"); 755 pr_warn("Error reading Wireless status\n");
756 return -EINVAL; 756 return -EINVAL;
757 } 757 }
758 return !!(status & mask); 758 return !!(status & mask);
@@ -764,7 +764,7 @@ static int asus_wireless_status(struct asus_laptop *asus, int mask)
764static int asus_wlan_set(struct asus_laptop *asus, int status) 764static int asus_wlan_set(struct asus_laptop *asus, int status)
765{ 765{
766 if (write_acpi_int(asus->handle, METHOD_WLAN, !!status)) { 766 if (write_acpi_int(asus->handle, METHOD_WLAN, !!status)) {
767 pr_warning("Error setting wlan status to %d", status); 767 pr_warn("Error setting wlan status to %d\n", status);
768 return -EIO; 768 return -EIO;
769 } 769 }
770 return 0; 770 return 0;
@@ -792,7 +792,7 @@ static ssize_t store_wlan(struct device *dev, struct device_attribute *attr,
792static int asus_bluetooth_set(struct asus_laptop *asus, int status) 792static int asus_bluetooth_set(struct asus_laptop *asus, int status)
793{ 793{
794 if (write_acpi_int(asus->handle, METHOD_BLUETOOTH, !!status)) { 794 if (write_acpi_int(asus->handle, METHOD_BLUETOOTH, !!status)) {
795 pr_warning("Error setting bluetooth status to %d", status); 795 pr_warn("Error setting bluetooth status to %d\n", status);
796 return -EIO; 796 return -EIO;
797 } 797 }
798 return 0; 798 return 0;
@@ -821,7 +821,7 @@ static ssize_t store_bluetooth(struct device *dev,
821static int asus_wimax_set(struct asus_laptop *asus, int status) 821static int asus_wimax_set(struct asus_laptop *asus, int status)
822{ 822{
823 if (write_acpi_int(asus->handle, METHOD_WIMAX, !!status)) { 823 if (write_acpi_int(asus->handle, METHOD_WIMAX, !!status)) {
824 pr_warning("Error setting wimax status to %d", status); 824 pr_warn("Error setting wimax status to %d\n", status);
825 return -EIO; 825 return -EIO;
826 } 826 }
827 return 0; 827 return 0;
@@ -850,7 +850,7 @@ static ssize_t store_wimax(struct device *dev,
850static int asus_wwan_set(struct asus_laptop *asus, int status) 850static int asus_wwan_set(struct asus_laptop *asus, int status)
851{ 851{
852 if (write_acpi_int(asus->handle, METHOD_WWAN, !!status)) { 852 if (write_acpi_int(asus->handle, METHOD_WWAN, !!status)) {
853 pr_warning("Error setting wwan status to %d", status); 853 pr_warn("Error setting wwan status to %d\n", status);
854 return -EIO; 854 return -EIO;
855 } 855 }
856 return 0; 856 return 0;
@@ -880,7 +880,7 @@ static void asus_set_display(struct asus_laptop *asus, int value)
880{ 880{
881 /* no sanity check needed for now */ 881 /* no sanity check needed for now */
882 if (write_acpi_int(asus->handle, METHOD_SWITCH_DISPLAY, value)) 882 if (write_acpi_int(asus->handle, METHOD_SWITCH_DISPLAY, value))
883 pr_warning("Error setting display\n"); 883 pr_warn("Error setting display\n");
884 return; 884 return;
885} 885}
886 886
@@ -909,7 +909,7 @@ static ssize_t store_disp(struct device *dev, struct device_attribute *attr,
909static void asus_als_switch(struct asus_laptop *asus, int value) 909static void asus_als_switch(struct asus_laptop *asus, int value)
910{ 910{
911 if (write_acpi_int(asus->handle, METHOD_ALS_CONTROL, value)) 911 if (write_acpi_int(asus->handle, METHOD_ALS_CONTROL, value))
912 pr_warning("Error setting light sensor switch\n"); 912 pr_warn("Error setting light sensor switch\n");
913 asus->light_switch = value; 913 asus->light_switch = value;
914} 914}
915 915
@@ -937,7 +937,7 @@ static ssize_t store_lssw(struct device *dev, struct device_attribute *attr,
937static void asus_als_level(struct asus_laptop *asus, int value) 937static void asus_als_level(struct asus_laptop *asus, int value)
938{ 938{
939 if (write_acpi_int(asus->handle, METHOD_ALS_LEVEL, value)) 939 if (write_acpi_int(asus->handle, METHOD_ALS_LEVEL, value))
940 pr_warning("Error setting light sensor level\n"); 940 pr_warn("Error setting light sensor level\n");
941 asus->light_level = value; 941 asus->light_level = value;
942} 942}
943 943
@@ -976,7 +976,7 @@ static int asus_gps_status(struct asus_laptop *asus)
976 rv = acpi_evaluate_integer(asus->handle, METHOD_GPS_STATUS, 976 rv = acpi_evaluate_integer(asus->handle, METHOD_GPS_STATUS,
977 NULL, &status); 977 NULL, &status);
978 if (ACPI_FAILURE(rv)) { 978 if (ACPI_FAILURE(rv)) {
979 pr_warning("Error reading GPS status\n"); 979 pr_warn("Error reading GPS status\n");
980 return -ENODEV; 980 return -ENODEV;
981 } 981 }
982 return !!status; 982 return !!status;
@@ -1284,7 +1284,7 @@ static int asus_laptop_get_info(struct asus_laptop *asus)
1284 */ 1284 */
1285 status = acpi_get_table(ACPI_SIG_DSDT, 1, &asus->dsdt_info); 1285 status = acpi_get_table(ACPI_SIG_DSDT, 1, &asus->dsdt_info);
1286 if (ACPI_FAILURE(status)) 1286 if (ACPI_FAILURE(status))
1287 pr_warning("Couldn't get the DSDT table header\n"); 1287 pr_warn("Couldn't get the DSDT table header\n");
1288 1288
1289 /* We have to write 0 on init this far for all ASUS models */ 1289 /* We have to write 0 on init this far for all ASUS models */
1290 if (write_acpi_int_ret(asus->handle, "INIT", 0, &buffer)) { 1290 if (write_acpi_int_ret(asus->handle, "INIT", 0, &buffer)) {
@@ -1296,7 +1296,7 @@ static int asus_laptop_get_info(struct asus_laptop *asus)
1296 status = 1296 status =
1297 acpi_evaluate_integer(asus->handle, "BSTS", NULL, &bsts_result); 1297 acpi_evaluate_integer(asus->handle, "BSTS", NULL, &bsts_result);
1298 if (ACPI_FAILURE(status)) 1298 if (ACPI_FAILURE(status))
1299 pr_warning("Error calling BSTS\n"); 1299 pr_warn("Error calling BSTS\n");
1300 else if (bsts_result) 1300 else if (bsts_result)
1301 pr_notice("BSTS called, 0x%02x returned\n", 1301 pr_notice("BSTS called, 0x%02x returned\n",
1302 (uint) bsts_result); 1302 (uint) bsts_result);
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index c8c9842753dc..00460cb9587b 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -425,7 +425,7 @@ static void asus_rfkill_hotplug(struct asus_wmi *asus)
425 if (asus->hotplug_slot) { 425 if (asus->hotplug_slot) {
426 bus = pci_find_bus(0, 1); 426 bus = pci_find_bus(0, 1);
427 if (!bus) { 427 if (!bus) {
428 pr_warning("Unable to find PCI bus 1?\n"); 428 pr_warn("Unable to find PCI bus 1?\n");
429 goto out_unlock; 429 goto out_unlock;
430 } 430 }
431 431
@@ -436,12 +436,12 @@ static void asus_rfkill_hotplug(struct asus_wmi *asus)
436 absent = (l == 0xffffffff); 436 absent = (l == 0xffffffff);
437 437
438 if (blocked != absent) { 438 if (blocked != absent) {
439 pr_warning("BIOS says wireless lan is %s, " 439 pr_warn("BIOS says wireless lan is %s, "
440 "but the pci device is %s\n", 440 "but the pci device is %s\n",
441 blocked ? "blocked" : "unblocked", 441 blocked ? "blocked" : "unblocked",
442 absent ? "absent" : "present"); 442 absent ? "absent" : "present");
443 pr_warning("skipped wireless hotplug as probably " 443 pr_warn("skipped wireless hotplug as probably "
444 "inappropriate for this model\n"); 444 "inappropriate for this model\n");
445 goto out_unlock; 445 goto out_unlock;
446 } 446 }
447 447
@@ -500,7 +500,7 @@ static int asus_register_rfkill_notifier(struct asus_wmi *asus, char *node)
500 ACPI_SYSTEM_NOTIFY, 500 ACPI_SYSTEM_NOTIFY,
501 asus_rfkill_notify, asus); 501 asus_rfkill_notify, asus);
502 if (ACPI_FAILURE(status)) 502 if (ACPI_FAILURE(status))
503 pr_warning("Failed to register notify on %s\n", node); 503 pr_warn("Failed to register notify on %s\n", node);
504 } else 504 } else
505 return -ENODEV; 505 return -ENODEV;
506 506
@@ -1583,12 +1583,12 @@ static int asus_wmi_probe(struct platform_device *pdev)
1583 int ret; 1583 int ret;
1584 1584
1585 if (!wmi_has_guid(ASUS_WMI_MGMT_GUID)) { 1585 if (!wmi_has_guid(ASUS_WMI_MGMT_GUID)) {
1586 pr_warning("Management GUID not found\n"); 1586 pr_warn("Management GUID not found\n");
1587 return -ENODEV; 1587 return -ENODEV;
1588 } 1588 }
1589 1589
1590 if (wdrv->event_guid && !wmi_has_guid(wdrv->event_guid)) { 1590 if (wdrv->event_guid && !wmi_has_guid(wdrv->event_guid)) {
1591 pr_warning("Event GUID not found\n"); 1591 pr_warn("Event GUID not found\n");
1592 return -ENODEV; 1592 return -ENODEV;
1593 } 1593 }
1594 1594
diff --git a/drivers/platform/x86/asus_acpi.c b/drivers/platform/x86/asus_acpi.c
index f503607c0645..d9312b3073e5 100644
--- a/drivers/platform/x86/asus_acpi.c
+++ b/drivers/platform/x86/asus_acpi.c
@@ -30,6 +30,8 @@
30 * 30 *
31 */ 31 */
32 32
33#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
34
33#include <linux/kernel.h> 35#include <linux/kernel.h>
34#include <linux/module.h> 36#include <linux/module.h>
35#include <linux/slab.h> 37#include <linux/slab.h>
@@ -581,8 +583,7 @@ static int read_led(const char *ledname, int ledmask)
581 if (read_acpi_int(NULL, ledname, &led_status)) 583 if (read_acpi_int(NULL, ledname, &led_status))
582 return led_status; 584 return led_status;
583 else 585 else
584 printk(KERN_WARNING "Asus ACPI: Error reading LED " 586 pr_warn("Error reading LED status\n");
585 "status\n");
586 } 587 }
587 return (hotk->status & ledmask) ? 1 : 0; 588 return (hotk->status & ledmask) ? 1 : 0;
588} 589}
@@ -621,8 +622,7 @@ write_led(const char __user *buffer, unsigned long count,
621 led_out = !led_out; 622 led_out = !led_out;
622 623
623 if (!write_acpi_int(hotk->handle, ledname, led_out, NULL)) 624 if (!write_acpi_int(hotk->handle, ledname, led_out, NULL))
624 printk(KERN_WARNING "Asus ACPI: LED (%s) write failed\n", 625 pr_warn("LED (%s) write failed\n", ledname);
625 ledname);
626 626
627 return rv; 627 return rv;
628} 628}
@@ -679,8 +679,7 @@ static ssize_t ledd_proc_write(struct file *file, const char __user *buffer,
679 if (rv > 0) { 679 if (rv > 0) {
680 if (!write_acpi_int 680 if (!write_acpi_int
681 (hotk->handle, hotk->methods->mt_ledd, value, NULL)) 681 (hotk->handle, hotk->methods->mt_ledd, value, NULL))
682 printk(KERN_WARNING 682 pr_warn("LED display write failed\n");
683 "Asus ACPI: LED display write failed\n");
684 else 683 else
685 hotk->ledd_status = (u32) value; 684 hotk->ledd_status = (u32) value;
686 } 685 }
@@ -838,8 +837,7 @@ static int get_lcd_state(void)
838 } else { 837 } else {
839 /* We don't have to check anything if we are here */ 838 /* We don't have to check anything if we are here */
840 if (!read_acpi_int(NULL, hotk->methods->lcd_status, &lcd)) 839 if (!read_acpi_int(NULL, hotk->methods->lcd_status, &lcd))
841 printk(KERN_WARNING 840 pr_warn("Error reading LCD status\n");
842 "Asus ACPI: Error reading LCD status\n");
843 841
844 if (hotk->model == L2D) 842 if (hotk->model == L2D)
845 lcd = ~lcd; 843 lcd = ~lcd;
@@ -871,7 +869,7 @@ static int set_lcd_state(int value)
871 the exact behaviour is simulated here */ 869 the exact behaviour is simulated here */
872 } 870 }
873 if (ACPI_FAILURE(status)) 871 if (ACPI_FAILURE(status))
874 printk(KERN_WARNING "Asus ACPI: Error switching LCD\n"); 872 pr_warn("Error switching LCD\n");
875 } 873 }
876 return 0; 874 return 0;
877 875
@@ -915,13 +913,11 @@ static int read_brightness(struct backlight_device *bd)
915 if (hotk->methods->brightness_get) { /* SPLV/GPLV laptop */ 913 if (hotk->methods->brightness_get) { /* SPLV/GPLV laptop */
916 if (!read_acpi_int(hotk->handle, hotk->methods->brightness_get, 914 if (!read_acpi_int(hotk->handle, hotk->methods->brightness_get,
917 &value)) 915 &value))
918 printk(KERN_WARNING 916 pr_warn("Error reading brightness\n");
919 "Asus ACPI: Error reading brightness\n");
920 } else if (hotk->methods->brightness_status) { /* For D1 for example */ 917 } else if (hotk->methods->brightness_status) { /* For D1 for example */
921 if (!read_acpi_int(NULL, hotk->methods->brightness_status, 918 if (!read_acpi_int(NULL, hotk->methods->brightness_status,
922 &value)) 919 &value))
923 printk(KERN_WARNING 920 pr_warn("Error reading brightness\n");
924 "Asus ACPI: Error reading brightness\n");
925 } else /* No GPLV method */ 921 } else /* No GPLV method */
926 value = hotk->brightness; 922 value = hotk->brightness;
927 return value; 923 return value;
@@ -939,8 +935,7 @@ static int set_brightness(int value)
939 if (hotk->methods->brightness_set) { 935 if (hotk->methods->brightness_set) {
940 if (!write_acpi_int(hotk->handle, hotk->methods->brightness_set, 936 if (!write_acpi_int(hotk->handle, hotk->methods->brightness_set,
941 value, NULL)) { 937 value, NULL)) {
942 printk(KERN_WARNING 938 pr_warn("Error changing brightness\n");
943 "Asus ACPI: Error changing brightness\n");
944 ret = -EIO; 939 ret = -EIO;
945 } 940 }
946 goto out; 941 goto out;
@@ -955,8 +950,7 @@ static int set_brightness(int value)
955 NULL, NULL); 950 NULL, NULL);
956 (value > 0) ? value-- : value++; 951 (value > 0) ? value-- : value++;
957 if (ACPI_FAILURE(status)) { 952 if (ACPI_FAILURE(status)) {
958 printk(KERN_WARNING 953 pr_warn("Error changing brightness\n");
959 "Asus ACPI: Error changing brightness\n");
960 ret = -EIO; 954 ret = -EIO;
961 } 955 }
962 } 956 }
@@ -1008,7 +1002,7 @@ static void set_display(int value)
1008 /* no sanity check needed for now */ 1002 /* no sanity check needed for now */
1009 if (!write_acpi_int(hotk->handle, hotk->methods->display_set, 1003 if (!write_acpi_int(hotk->handle, hotk->methods->display_set,
1010 value, NULL)) 1004 value, NULL))
1011 printk(KERN_WARNING "Asus ACPI: Error setting display\n"); 1005 pr_warn("Error setting display\n");
1012 return; 1006 return;
1013} 1007}
1014 1008
@@ -1021,8 +1015,7 @@ static int disp_proc_show(struct seq_file *m, void *v)
1021 int value = 0; 1015 int value = 0;
1022 1016
1023 if (!read_acpi_int(hotk->handle, hotk->methods->display_get, &value)) 1017 if (!read_acpi_int(hotk->handle, hotk->methods->display_get, &value))
1024 printk(KERN_WARNING 1018 pr_warn("Error reading display status\n");
1025 "Asus ACPI: Error reading display status\n");
1026 value &= 0x07; /* needed for some models, shouldn't hurt others */ 1019 value &= 0x07; /* needed for some models, shouldn't hurt others */
1027 seq_printf(m, "%d\n", value); 1020 seq_printf(m, "%d\n", value);
1028 return 0; 1021 return 0;
@@ -1068,7 +1061,7 @@ asus_proc_add(char *name, const struct file_operations *proc_fops, mode_t mode,
1068 proc = proc_create_data(name, mode, acpi_device_dir(device), 1061 proc = proc_create_data(name, mode, acpi_device_dir(device),
1069 proc_fops, acpi_driver_data(device)); 1062 proc_fops, acpi_driver_data(device));
1070 if (!proc) { 1063 if (!proc) {
1071 printk(KERN_WARNING " Unable to create %s fs entry\n", name); 1064 pr_warn(" Unable to create %s fs entry\n", name);
1072 return -1; 1065 return -1;
1073 } 1066 }
1074 proc->uid = asus_uid; 1067 proc->uid = asus_uid;
@@ -1085,8 +1078,8 @@ static int asus_hotk_add_fs(struct acpi_device *device)
1085 mode = S_IFREG | S_IRUGO | S_IWUSR | S_IWGRP; 1078 mode = S_IFREG | S_IRUGO | S_IWUSR | S_IWGRP;
1086 } else { 1079 } else {
1087 mode = S_IFREG | S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP; 1080 mode = S_IFREG | S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP;
1088 printk(KERN_WARNING " asus_uid and asus_gid parameters are " 1081 pr_warn(" asus_uid and asus_gid parameters are "
1089 "deprecated, use chown and chmod instead!\n"); 1082 "deprecated, use chown and chmod instead!\n");
1090 } 1083 }
1091 1084
1092 acpi_device_dir(device) = asus_proc_dir; 1085 acpi_device_dir(device) = asus_proc_dir;
@@ -1099,8 +1092,7 @@ static int asus_hotk_add_fs(struct acpi_device *device)
1099 proc->uid = asus_uid; 1092 proc->uid = asus_uid;
1100 proc->gid = asus_gid; 1093 proc->gid = asus_gid;
1101 } else { 1094 } else {
1102 printk(KERN_WARNING " Unable to create " PROC_INFO 1095 pr_warn(" Unable to create " PROC_INFO " fs entry\n");
1103 " fs entry\n");
1104 } 1096 }
1105 1097
1106 if (hotk->methods->mt_wled) { 1098 if (hotk->methods->mt_wled) {
@@ -1283,20 +1275,19 @@ static int asus_hotk_get_info(void)
1283 */ 1275 */
1284 status = acpi_get_table(ACPI_SIG_DSDT, 1, &asus_info); 1276 status = acpi_get_table(ACPI_SIG_DSDT, 1, &asus_info);
1285 if (ACPI_FAILURE(status)) 1277 if (ACPI_FAILURE(status))
1286 printk(KERN_WARNING " Couldn't get the DSDT table header\n"); 1278 pr_warn(" Couldn't get the DSDT table header\n");
1287 1279
1288 /* We have to write 0 on init this far for all ASUS models */ 1280 /* We have to write 0 on init this far for all ASUS models */
1289 if (!write_acpi_int(hotk->handle, "INIT", 0, &buffer)) { 1281 if (!write_acpi_int(hotk->handle, "INIT", 0, &buffer)) {
1290 printk(KERN_ERR " Hotkey initialization failed\n"); 1282 pr_err(" Hotkey initialization failed\n");
1291 return -ENODEV; 1283 return -ENODEV;
1292 } 1284 }
1293 1285
1294 /* This needs to be called for some laptops to init properly */ 1286 /* This needs to be called for some laptops to init properly */
1295 if (!read_acpi_int(hotk->handle, "BSTS", &bsts_result)) 1287 if (!read_acpi_int(hotk->handle, "BSTS", &bsts_result))
1296 printk(KERN_WARNING " Error calling BSTS\n"); 1288 pr_warn(" Error calling BSTS\n");
1297 else if (bsts_result) 1289 else if (bsts_result)
1298 printk(KERN_NOTICE " BSTS called, 0x%02x returned\n", 1290 pr_notice(" BSTS called, 0x%02x returned\n", bsts_result);
1299 bsts_result);
1300 1291
1301 /* 1292 /*
1302 * Try to match the object returned by INIT to the specific model. 1293 * Try to match the object returned by INIT to the specific model.
@@ -1324,23 +1315,21 @@ static int asus_hotk_get_info(void)
1324 if (asus_info && 1315 if (asus_info &&
1325 strncmp(asus_info->oem_table_id, "ODEM", 4) == 0) { 1316 strncmp(asus_info->oem_table_id, "ODEM", 4) == 0) {
1326 hotk->model = P30; 1317 hotk->model = P30;
1327 printk(KERN_NOTICE 1318 pr_notice(" Samsung P30 detected, supported\n");
1328 " Samsung P30 detected, supported\n");
1329 hotk->methods = &model_conf[hotk->model]; 1319 hotk->methods = &model_conf[hotk->model];
1330 kfree(model); 1320 kfree(model);
1331 return 0; 1321 return 0;
1332 } else { 1322 } else {
1333 hotk->model = M2E; 1323 hotk->model = M2E;
1334 printk(KERN_NOTICE " unsupported model %s, trying " 1324 pr_notice(" unsupported model %s, trying default values\n",
1335 "default values\n", string); 1325 string);
1336 printk(KERN_NOTICE 1326 pr_notice(" send /proc/acpi/dsdt to the developers\n");
1337 " send /proc/acpi/dsdt to the developers\n");
1338 kfree(model); 1327 kfree(model);
1339 return -ENODEV; 1328 return -ENODEV;
1340 } 1329 }
1341 } 1330 }
1342 hotk->methods = &model_conf[hotk->model]; 1331 hotk->methods = &model_conf[hotk->model];
1343 printk(KERN_NOTICE " %s model detected, supported\n", string); 1332 pr_notice(" %s model detected, supported\n", string);
1344 1333
1345 /* Sort of per-model blacklist */ 1334 /* Sort of per-model blacklist */
1346 if (strncmp(string, "L2B", 3) == 0) 1335 if (strncmp(string, "L2B", 3) == 0)
@@ -1385,7 +1374,7 @@ static int asus_hotk_check(void)
1385 if (hotk->device->status.present) { 1374 if (hotk->device->status.present) {
1386 result = asus_hotk_get_info(); 1375 result = asus_hotk_get_info();
1387 } else { 1376 } else {
1388 printk(KERN_ERR " Hotkey device not present, aborting\n"); 1377 pr_err(" Hotkey device not present, aborting\n");
1389 return -EINVAL; 1378 return -EINVAL;
1390 } 1379 }
1391 1380
@@ -1399,8 +1388,7 @@ static int asus_hotk_add(struct acpi_device *device)
1399 acpi_status status = AE_OK; 1388 acpi_status status = AE_OK;
1400 int result; 1389 int result;
1401 1390
1402 printk(KERN_NOTICE "Asus Laptop ACPI Extras version %s\n", 1391 pr_notice("Asus Laptop ACPI Extras version %s\n", ASUS_ACPI_VERSION);
1403 ASUS_ACPI_VERSION);
1404 1392
1405 hotk = kzalloc(sizeof(struct asus_hotk), GFP_KERNEL); 1393 hotk = kzalloc(sizeof(struct asus_hotk), GFP_KERNEL);
1406 if (!hotk) 1394 if (!hotk)
@@ -1428,15 +1416,14 @@ static int asus_hotk_add(struct acpi_device *device)
1428 acpi_evaluate_object(NULL, hotk->methods->brightness_down, 1416 acpi_evaluate_object(NULL, hotk->methods->brightness_down,
1429 NULL, NULL); 1417 NULL, NULL);
1430 if (ACPI_FAILURE(status)) 1418 if (ACPI_FAILURE(status))
1431 printk(KERN_WARNING " Error changing brightness\n"); 1419 pr_warn(" Error changing brightness\n");
1432 else { 1420 else {
1433 status = 1421 status =
1434 acpi_evaluate_object(NULL, 1422 acpi_evaluate_object(NULL,
1435 hotk->methods->brightness_up, 1423 hotk->methods->brightness_up,
1436 NULL, NULL); 1424 NULL, NULL);
1437 if (ACPI_FAILURE(status)) 1425 if (ACPI_FAILURE(status))
1438 printk(KERN_WARNING " Strange, error changing" 1426 pr_warn(" Strange, error changing brightness\n");
1439 " brightness\n");
1440 } 1427 }
1441 } 1428 }
1442 1429
@@ -1488,7 +1475,7 @@ static int __init asus_acpi_init(void)
1488 1475
1489 asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir); 1476 asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir);
1490 if (!asus_proc_dir) { 1477 if (!asus_proc_dir) {
1491 printk(KERN_ERR "Asus ACPI: Unable to create /proc entry\n"); 1478 pr_err("Unable to create /proc entry\n");
1492 acpi_bus_unregister_driver(&asus_hotk_driver); 1479 acpi_bus_unregister_driver(&asus_hotk_driver);
1493 return -ENODEV; 1480 return -ENODEV;
1494 } 1481 }
@@ -1513,7 +1500,7 @@ static int __init asus_acpi_init(void)
1513 &asus_backlight_data, 1500 &asus_backlight_data,
1514 &props); 1501 &props);
1515 if (IS_ERR(asus_backlight_device)) { 1502 if (IS_ERR(asus_backlight_device)) {
1516 printk(KERN_ERR "Could not register asus backlight device\n"); 1503 pr_err("Could not register asus backlight device\n");
1517 asus_backlight_device = NULL; 1504 asus_backlight_device = NULL;
1518 asus_acpi_exit(); 1505 asus_acpi_exit();
1519 return -ENODEV; 1506 return -ENODEV;