Skip to content

Commit

Permalink
hwmon: (smsc47b397) Use pr_fmt and pr_<level>
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
  • Loading branch information
JoePerches authored and Guenter Roeck committed Jan 8, 2011
1 parent 4b2515d commit bf1a85e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions drivers/hwmon/smsc47b397.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/module.h>
#include <linux/slab.h>
#include <linux/ioport.h>
Expand Down Expand Up @@ -311,21 +313,19 @@ static int __init smsc47b397_device_add(unsigned short address)
pdev = platform_device_alloc(DRVNAME, address);
if (!pdev) {
err = -ENOMEM;
printk(KERN_ERR DRVNAME ": Device allocation failed\n");
pr_err("Device allocation failed\n");
goto exit;
}

err = platform_device_add_resources(pdev, &res, 1);
if (err) {
printk(KERN_ERR DRVNAME ": Device resource addition failed "
"(%d)\n", err);
pr_err("Device resource addition failed (%d)\n", err);
goto exit_device_put;
}

err = platform_device_add(pdev);
if (err) {
printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n",
err);
pr_err("Device addition failed (%d)\n", err);
goto exit_device_put;
}

Expand Down Expand Up @@ -367,8 +367,7 @@ static int __init smsc47b397_find(unsigned short *addr)
*addr = (superio_inb(SUPERIO_REG_BASE_MSB) << 8)
| superio_inb(SUPERIO_REG_BASE_LSB);

printk(KERN_INFO DRVNAME ": found SMSC %s "
"(base address 0x%04x, revision %u)\n",
pr_info("found SMSC %s (base address 0x%04x, revision %u)\n",
name, *addr, rev);

superio_exit();
Expand Down

0 comments on commit bf1a85e

Please sign in to comment.