From 63366d37ad5dbb4f208b517c88ea4bd41738dbf7 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 20 Oct 2010 06:51:40 +0000 Subject: [PATCH] hwmon: (lis3lv02d) Use pr_fmt and pr_ Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_ Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches Signed-off-by: Guenter Roeck --- drivers/hwmon/lis3lv02d.c | 23 +++++++++++------------ 1 file 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 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -860,8 +862,7 @@ static void lis3lv02d_8b_configure(struct lis3lv02d *dev, (p->irq_flags2 & IRQF_TRIGGER_MASK), DRIVER_NAME, &lis3_dev); if (err < 0) - printk(KERN_ERR DRIVER_NAME - "No second IRQ. Limited functionality\n"); + pr_err("No second IRQ. Limited functionality\n"); } } @@ -879,7 +880,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) switch (dev->whoami) { 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->mdps_max_val = 2048; dev->pwron_delay = LIS3_PWRON_DELAY_WAI_12B; @@ -890,7 +891,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) dev->regs_size = ARRAY_SIZE(lis3_wai12_regs); break; 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->mdps_max_val = 128; dev->pwron_delay = LIS3_PWRON_DELAY_WAI_8B; @@ -901,7 +902,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) dev->regs_size = ARRAY_SIZE(lis3_wai8_regs); break; 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->mdps_max_val = 128; dev->pwron_delay = LIS3_PWRON_DELAY_WAI_8B; @@ -910,8 +911,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) dev->scale = LIS3_SENSITIVITY_8B; break; default: - printk(KERN_ERR DRIVER_NAME - ": unknown sensor type 0x%X\n", dev->whoami); + pr_err("unknown sensor type 0x%X\n", dev->whoami); return -EINVAL; } @@ -935,7 +935,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) } 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 * used by the SPI transport layer at the moment */ @@ -957,8 +957,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) /* bail if we did not get an IRQ from the bus layer */ if (!dev->irq) { - printk(KERN_ERR DRIVER_NAME - ": No IRQ. Disabling /dev/freefall\n"); + pr_err("No IRQ. Disabling /dev/freefall\n"); goto out; } @@ -985,12 +984,12 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) DRIVER_NAME, &lis3_dev); if (err < 0) { - printk(KERN_ERR DRIVER_NAME "Cannot get IRQ\n"); + pr_err("Cannot get IRQ\n"); goto out; } if (misc_register(&lis3lv02d_misc_device)) - printk(KERN_ERR DRIVER_NAME ": misc_register failed\n"); + pr_err("misc_register failed\n"); out: return 0; } -- 2.39.5