diff options
author | Joe Perches <joe@perches.com> | 2010-10-20 02:51:40 -0400 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-01-08 13:55:14 -0500 |
commit | 63366d37ad5dbb4f208b517c88ea4bd41738dbf7 (patch) | |
tree | d8a28c16db2b44c59a569ce38332f1a6acff2c64 | |
parent | 55d705cce829c37999f26a8d4f1dd701013e7920 (diff) |
hwmon: (lis3lv02d) Use pr_fmt and pr_<level>
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
-rw-r--r-- | drivers/hwmon/lis3lv02d.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/hwmon/lis3lv02d.c b/drivers/hwmon/lis3lv02d.c index 0cee73a6124e..1b674b7d4584 100644 --- a/drivers/hwmon/lis3lv02d.c +++ b/drivers/hwmon/lis3lv02d.c | |||
@@ -20,6 +20,8 @@ | |||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
24 | |||
23 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
24 | #include <linux/init.h> | 26 | #include <linux/init.h> |
25 | #include <linux/dmi.h> | 27 | #include <linux/dmi.h> |
@@ -860,8 +862,7 @@ static void lis3lv02d_8b_configure(struct lis3lv02d *dev, | |||
860 | (p->irq_flags2 & IRQF_TRIGGER_MASK), | 862 | (p->irq_flags2 & IRQF_TRIGGER_MASK), |
861 | DRIVER_NAME, &lis3_dev); | 863 | DRIVER_NAME, &lis3_dev); |
862 | if (err < 0) | 864 | if (err < 0) |
863 | printk(KERN_ERR DRIVER_NAME | 865 | pr_err("No second IRQ. Limited functionality\n"); |
864 | "No second IRQ. Limited functionality\n"); | ||
865 | } | 866 | } |
866 | } | 867 | } |
867 | 868 | ||
@@ -879,7 +880,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) | |||
879 | 880 | ||
880 | switch (dev->whoami) { | 881 | switch (dev->whoami) { |
881 | case WAI_12B: | 882 | case WAI_12B: |
882 | printk(KERN_INFO DRIVER_NAME ": 12 bits sensor found\n"); | 883 | pr_info("12 bits sensor found\n"); |
883 | dev->read_data = lis3lv02d_read_12; | 884 | dev->read_data = lis3lv02d_read_12; |
884 | dev->mdps_max_val = 2048; | 885 | dev->mdps_max_val = 2048; |
885 | dev->pwron_delay = LIS3_PWRON_DELAY_WAI_12B; | 886 | dev->pwron_delay = LIS3_PWRON_DELAY_WAI_12B; |
@@ -890,7 +891,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) | |||
890 | dev->regs_size = ARRAY_SIZE(lis3_wai12_regs); | 891 | dev->regs_size = ARRAY_SIZE(lis3_wai12_regs); |
891 | break; | 892 | break; |
892 | case WAI_8B: | 893 | case WAI_8B: |
893 | printk(KERN_INFO DRIVER_NAME ": 8 bits sensor found\n"); | 894 | pr_info("8 bits sensor found\n"); |
894 | dev->read_data = lis3lv02d_read_8; | 895 | dev->read_data = lis3lv02d_read_8; |
895 | dev->mdps_max_val = 128; | 896 | dev->mdps_max_val = 128; |
896 | dev->pwron_delay = LIS3_PWRON_DELAY_WAI_8B; | 897 | dev->pwron_delay = LIS3_PWRON_DELAY_WAI_8B; |
@@ -901,7 +902,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) | |||
901 | dev->regs_size = ARRAY_SIZE(lis3_wai8_regs); | 902 | dev->regs_size = ARRAY_SIZE(lis3_wai8_regs); |
902 | break; | 903 | break; |
903 | case WAI_3DC: | 904 | case WAI_3DC: |
904 | printk(KERN_INFO DRIVER_NAME ": 8 bits 3DC sensor found\n"); | 905 | pr_info("8 bits 3DC sensor found\n"); |
905 | dev->read_data = lis3lv02d_read_8; | 906 | dev->read_data = lis3lv02d_read_8; |
906 | dev->mdps_max_val = 128; | 907 | dev->mdps_max_val = 128; |
907 | dev->pwron_delay = LIS3_PWRON_DELAY_WAI_8B; | 908 | dev->pwron_delay = LIS3_PWRON_DELAY_WAI_8B; |
@@ -910,8 +911,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) | |||
910 | dev->scale = LIS3_SENSITIVITY_8B; | 911 | dev->scale = LIS3_SENSITIVITY_8B; |
911 | break; | 912 | break; |
912 | default: | 913 | default: |
913 | printk(KERN_ERR DRIVER_NAME | 914 | pr_err("unknown sensor type 0x%X\n", dev->whoami); |
914 | ": unknown sensor type 0x%X\n", dev->whoami); | ||
915 | return -EINVAL; | 915 | return -EINVAL; |
916 | } | 916 | } |
917 | 917 | ||
@@ -935,7 +935,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) | |||
935 | } | 935 | } |
936 | 936 | ||
937 | if (lis3lv02d_joystick_enable()) | 937 | if (lis3lv02d_joystick_enable()) |
938 | printk(KERN_ERR DRIVER_NAME ": joystick initialization failed\n"); | 938 | pr_err("joystick initialization failed\n"); |
939 | 939 | ||
940 | /* passing in platform specific data is purely optional and only | 940 | /* passing in platform specific data is purely optional and only |
941 | * used by the SPI transport layer at the moment */ | 941 | * used by the SPI transport layer at the moment */ |
@@ -957,8 +957,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) | |||
957 | 957 | ||
958 | /* bail if we did not get an IRQ from the bus layer */ | 958 | /* bail if we did not get an IRQ from the bus layer */ |
959 | if (!dev->irq) { | 959 | if (!dev->irq) { |
960 | printk(KERN_ERR DRIVER_NAME | 960 | pr_err("No IRQ. Disabling /dev/freefall\n"); |
961 | ": No IRQ. Disabling /dev/freefall\n"); | ||
962 | goto out; | 961 | goto out; |
963 | } | 962 | } |
964 | 963 | ||
@@ -985,12 +984,12 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) | |||
985 | DRIVER_NAME, &lis3_dev); | 984 | DRIVER_NAME, &lis3_dev); |
986 | 985 | ||
987 | if (err < 0) { | 986 | if (err < 0) { |
988 | printk(KERN_ERR DRIVER_NAME "Cannot get IRQ\n"); | 987 | pr_err("Cannot get IRQ\n"); |
989 | goto out; | 988 | goto out; |
990 | } | 989 | } |
991 | 990 | ||
992 | if (misc_register(&lis3lv02d_misc_device)) | 991 | if (misc_register(&lis3lv02d_misc_device)) |
993 | printk(KERN_ERR DRIVER_NAME ": misc_register failed\n"); | 992 | pr_err("misc_register failed\n"); |
994 | out: | 993 | out: |
995 | return 0; | 994 | return 0; |
996 | } | 995 | } |