Commit 63366d37 authored by Joe Perches's avatar Joe Perches Committed by Guenter Roeck

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
parent 55d705cc
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/dmi.h> #include <linux/dmi.h>
...@@ -860,8 +862,7 @@ static void lis3lv02d_8b_configure(struct lis3lv02d *dev, ...@@ -860,8 +862,7 @@ static void lis3lv02d_8b_configure(struct lis3lv02d *dev,
(p->irq_flags2 & IRQF_TRIGGER_MASK), (p->irq_flags2 & IRQF_TRIGGER_MASK),
DRIVER_NAME, &lis3_dev); DRIVER_NAME, &lis3_dev);
if (err < 0) if (err < 0)
printk(KERN_ERR DRIVER_NAME pr_err("No second IRQ. Limited functionality\n");
"No second IRQ. Limited functionality\n");
} }
} }
...@@ -879,7 +880,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) ...@@ -879,7 +880,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)
switch (dev->whoami) { switch (dev->whoami) {
case WAI_12B: case WAI_12B:
printk(KERN_INFO DRIVER_NAME ": 12 bits sensor found\n"); pr_info("12 bits sensor found\n");
dev->read_data = lis3lv02d_read_12; dev->read_data = lis3lv02d_read_12;
dev->mdps_max_val = 2048; dev->mdps_max_val = 2048;
dev->pwron_delay = LIS3_PWRON_DELAY_WAI_12B; dev->pwron_delay = LIS3_PWRON_DELAY_WAI_12B;
...@@ -890,7 +891,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) ...@@ -890,7 +891,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)
dev->regs_size = ARRAY_SIZE(lis3_wai12_regs); dev->regs_size = ARRAY_SIZE(lis3_wai12_regs);
break; break;
case WAI_8B: case WAI_8B:
printk(KERN_INFO DRIVER_NAME ": 8 bits sensor found\n"); pr_info("8 bits sensor found\n");
dev->read_data = lis3lv02d_read_8; dev->read_data = lis3lv02d_read_8;
dev->mdps_max_val = 128; dev->mdps_max_val = 128;
dev->pwron_delay = LIS3_PWRON_DELAY_WAI_8B; dev->pwron_delay = LIS3_PWRON_DELAY_WAI_8B;
...@@ -901,7 +902,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) ...@@ -901,7 +902,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)
dev->regs_size = ARRAY_SIZE(lis3_wai8_regs); dev->regs_size = ARRAY_SIZE(lis3_wai8_regs);
break; break;
case WAI_3DC: case WAI_3DC:
printk(KERN_INFO DRIVER_NAME ": 8 bits 3DC sensor found\n"); pr_info("8 bits 3DC sensor found\n");
dev->read_data = lis3lv02d_read_8; dev->read_data = lis3lv02d_read_8;
dev->mdps_max_val = 128; dev->mdps_max_val = 128;
dev->pwron_delay = LIS3_PWRON_DELAY_WAI_8B; dev->pwron_delay = LIS3_PWRON_DELAY_WAI_8B;
...@@ -910,8 +911,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) ...@@ -910,8 +911,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)
dev->scale = LIS3_SENSITIVITY_8B; dev->scale = LIS3_SENSITIVITY_8B;
break; break;
default: default:
printk(KERN_ERR DRIVER_NAME pr_err("unknown sensor type 0x%X\n", dev->whoami);
": unknown sensor type 0x%X\n", dev->whoami);
return -EINVAL; return -EINVAL;
} }
...@@ -935,7 +935,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) ...@@ -935,7 +935,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)
} }
if (lis3lv02d_joystick_enable()) if (lis3lv02d_joystick_enable())
printk(KERN_ERR DRIVER_NAME ": joystick initialization failed\n"); pr_err("joystick initialization failed\n");
/* passing in platform specific data is purely optional and only /* passing in platform specific data is purely optional and only
* used by the SPI transport layer at the moment */ * used by the SPI transport layer at the moment */
...@@ -957,8 +957,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) ...@@ -957,8 +957,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)
/* bail if we did not get an IRQ from the bus layer */ /* bail if we did not get an IRQ from the bus layer */
if (!dev->irq) { if (!dev->irq) {
printk(KERN_ERR DRIVER_NAME pr_err("No IRQ. Disabling /dev/freefall\n");
": No IRQ. Disabling /dev/freefall\n");
goto out; goto out;
} }
...@@ -985,12 +984,12 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) ...@@ -985,12 +984,12 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)
DRIVER_NAME, &lis3_dev); DRIVER_NAME, &lis3_dev);
if (err < 0) { if (err < 0) {
printk(KERN_ERR DRIVER_NAME "Cannot get IRQ\n"); pr_err("Cannot get IRQ\n");
goto out; goto out;
} }
if (misc_register(&lis3lv02d_misc_device)) if (misc_register(&lis3lv02d_misc_device))
printk(KERN_ERR DRIVER_NAME ": misc_register failed\n"); pr_err("misc_register failed\n");
out: out:
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment