Commit 77bad7c830e20085deba6a760ce85c13ecb12f4d
Committed by
Matthew Garrett
1 parent
22441ffeed
Exists in
master
and in
39 other branches
fujitsu-laptop: Convert printks to pr_<level>
Added pr_fmt, converted printks and removed hard coded prefixes. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Showing 1 changed file with 19 additions and 20 deletions Side-by-side Diff
drivers/platform/x86/fujitsu-laptop.c
... | ... | @@ -56,6 +56,8 @@ |
56 | 56 | * |
57 | 57 | */ |
58 | 58 | |
59 | +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | |
60 | + | |
59 | 61 | #include <linux/module.h> |
60 | 62 | #include <linux/kernel.h> |
61 | 63 | #include <linux/init.h> |
... | ... | @@ -585,8 +587,7 @@ |
585 | 587 | static void dmi_check_cb_common(const struct dmi_system_id *id) |
586 | 588 | { |
587 | 589 | acpi_handle handle; |
588 | - printk(KERN_INFO "fujitsu-laptop: Identified laptop model '%s'.\n", | |
589 | - id->ident); | |
590 | + pr_info("Identified laptop model '%s'\n", id->ident); | |
590 | 591 | if (use_alt_lcd_levels == -1) { |
591 | 592 | if (ACPI_SUCCESS(acpi_get_handle(NULL, |
592 | 593 | "\\_SB.PCI0.LPCB.FJEX.SBL2", &handle))) |
593 | 594 | |
... | ... | @@ -691,11 +692,11 @@ |
691 | 692 | |
692 | 693 | result = acpi_bus_update_power(fujitsu->acpi_handle, &state); |
693 | 694 | if (result) { |
694 | - printk(KERN_ERR "Error reading power state\n"); | |
695 | + pr_err("Error reading power state\n"); | |
695 | 696 | goto err_unregister_input_dev; |
696 | 697 | } |
697 | 698 | |
698 | - printk(KERN_INFO "ACPI: %s [%s] (%s)\n", | |
699 | + pr_info("ACPI: %s [%s] (%s)\n", | |
699 | 700 | acpi_device_name(device), acpi_device_bid(device), |
700 | 701 | !device->power.state ? "on" : "off"); |
701 | 702 | |
... | ... | @@ -707,7 +708,7 @@ |
707 | 708 | if (ACPI_FAILURE |
708 | 709 | (acpi_evaluate_object |
709 | 710 | (device->handle, METHOD_NAME__INI, NULL, NULL))) |
710 | - printk(KERN_ERR "_INI Method failed\n"); | |
711 | + pr_err("_INI Method failed\n"); | |
711 | 712 | } |
712 | 713 | |
713 | 714 | /* do config (detect defaults) */ |
... | ... | @@ -827,7 +828,7 @@ |
827 | 828 | error = kfifo_alloc(&fujitsu_hotkey->fifo, RINGBUFFERSIZE * sizeof(int), |
828 | 829 | GFP_KERNEL); |
829 | 830 | if (error) { |
830 | - printk(KERN_ERR "kfifo_alloc failed\n"); | |
831 | + pr_err("kfifo_alloc failed\n"); | |
831 | 832 | goto err_stop; |
832 | 833 | } |
833 | 834 | |
834 | 835 | |
... | ... | @@ -859,13 +860,13 @@ |
859 | 860 | |
860 | 861 | result = acpi_bus_update_power(fujitsu_hotkey->acpi_handle, &state); |
861 | 862 | if (result) { |
862 | - printk(KERN_ERR "Error reading power state\n"); | |
863 | + pr_err("Error reading power state\n"); | |
863 | 864 | goto err_unregister_input_dev; |
864 | 865 | } |
865 | 866 | |
866 | - printk(KERN_INFO "ACPI: %s [%s] (%s)\n", | |
867 | - acpi_device_name(device), acpi_device_bid(device), | |
868 | - !device->power.state ? "on" : "off"); | |
867 | + pr_info("ACPI: %s [%s] (%s)\n", | |
868 | + acpi_device_name(device), acpi_device_bid(device), | |
869 | + !device->power.state ? "on" : "off"); | |
869 | 870 | |
870 | 871 | fujitsu_hotkey->dev = device; |
871 | 872 | |
... | ... | @@ -875,7 +876,7 @@ |
875 | 876 | if (ACPI_FAILURE |
876 | 877 | (acpi_evaluate_object |
877 | 878 | (device->handle, METHOD_NAME__INI, NULL, NULL))) |
878 | - printk(KERN_ERR "_INI Method failed\n"); | |
879 | + pr_err("_INI Method failed\n"); | |
879 | 880 | } |
880 | 881 | |
881 | 882 | i = 0; |
... | ... | @@ -897,8 +898,7 @@ |
897 | 898 | call_fext_func(FUNC_RFKILL, 0x4, 0x0, 0x0); |
898 | 899 | |
899 | 900 | /* Suspect this is a keymap of the application panel, print it */ |
900 | - printk(KERN_INFO "fujitsu-laptop: BTNI: [0x%x]\n", | |
901 | - call_fext_func(FUNC_BUTTONS, 0x0, 0x0, 0x0)); | |
901 | + pr_info("BTNI: [0x%x]\n", call_fext_func(FUNC_BUTTONS, 0x0, 0x0, 0x0)); | |
902 | 902 | |
903 | 903 | #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) |
904 | 904 | if (call_fext_func(FUNC_LEDS, 0x0, 0x0, 0x0) & LOGOLAMP_POWERON) { |
... | ... | @@ -907,8 +907,8 @@ |
907 | 907 | if (result == 0) { |
908 | 908 | fujitsu_hotkey->logolamp_registered = 1; |
909 | 909 | } else { |
910 | - printk(KERN_ERR "fujitsu-laptop: Could not register " | |
911 | - "LED handler for logo lamp, error %i\n", result); | |
910 | + pr_err("Could not register LED handler for logo lamp, error %i\n", | |
911 | + result); | |
912 | 912 | } |
913 | 913 | } |
914 | 914 | |
... | ... | @@ -919,8 +919,8 @@ |
919 | 919 | if (result == 0) { |
920 | 920 | fujitsu_hotkey->kblamps_registered = 1; |
921 | 921 | } else { |
922 | - printk(KERN_ERR "fujitsu-laptop: Could not register " | |
923 | - "LED handler for keyboard lamps, error %i\n", result); | |
922 | + pr_err("Could not register LED handler for keyboard lamps, error %i\n", | |
923 | + result); | |
924 | 924 | } |
925 | 925 | } |
926 | 926 | #endif |
... | ... | @@ -1169,8 +1169,7 @@ |
1169 | 1169 | fujitsu->bl_device->props.power = 0; |
1170 | 1170 | } |
1171 | 1171 | |
1172 | - printk(KERN_INFO "fujitsu-laptop: driver " FUJITSU_DRIVER_VERSION | |
1173 | - " successfully loaded.\n"); | |
1172 | + pr_info("driver " FUJITSU_DRIVER_VERSION " successfully loaded\n"); | |
1174 | 1173 | |
1175 | 1174 | return 0; |
1176 | 1175 | |
... | ... | @@ -1216,7 +1215,7 @@ |
1216 | 1215 | |
1217 | 1216 | kfree(fujitsu); |
1218 | 1217 | |
1219 | - printk(KERN_INFO "fujitsu-laptop: driver unloaded.\n"); | |
1218 | + pr_info("driver unloaded\n"); | |
1220 | 1219 | } |
1221 | 1220 | |
1222 | 1221 | module_init(fujitsu_init); |