Commit 5ed9ba6b authored by Joe Perches's avatar Joe Perches Committed by Guenter Roeck

hwmon: (vt1211) 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 774f7827
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -1254,8 +1256,7 @@ static int __init vt1211_device_add(unsigned short address) ...@@ -1254,8 +1256,7 @@ static int __init vt1211_device_add(unsigned short address)
pdev = platform_device_alloc(DRVNAME, address); pdev = platform_device_alloc(DRVNAME, address);
if (!pdev) { if (!pdev) {
err = -ENOMEM; err = -ENOMEM;
printk(KERN_ERR DRVNAME ": Device allocation failed (%d)\n", pr_err("Device allocation failed (%d)\n", err);
err);
goto EXIT; goto EXIT;
} }
...@@ -1266,15 +1267,13 @@ static int __init vt1211_device_add(unsigned short address) ...@@ -1266,15 +1267,13 @@ static int __init vt1211_device_add(unsigned short address)
err = platform_device_add_resources(pdev, &res, 1); err = platform_device_add_resources(pdev, &res, 1);
if (err) { if (err) {
printk(KERN_ERR DRVNAME ": Device resource addition failed " pr_err("Device resource addition failed (%d)\n", err);
"(%d)\n", err);
goto EXIT_DEV_PUT; goto EXIT_DEV_PUT;
} }
err = platform_device_add(pdev); err = platform_device_add(pdev);
if (err) { if (err) {
printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", pr_err("Device addition failed (%d)\n", err);
err);
goto EXIT_DEV_PUT; goto EXIT_DEV_PUT;
} }
...@@ -1301,23 +1300,20 @@ static int __init vt1211_find(int sio_cip, unsigned short *address) ...@@ -1301,23 +1300,20 @@ static int __init vt1211_find(int sio_cip, unsigned short *address)
superio_select(sio_cip, SIO_VT1211_LDN_HWMON); superio_select(sio_cip, SIO_VT1211_LDN_HWMON);
if ((superio_inb(sio_cip, SIO_VT1211_ACTIVE) & 1) == 0) { if ((superio_inb(sio_cip, SIO_VT1211_ACTIVE) & 1) == 0) {
printk(KERN_WARNING DRVNAME ": HW monitor is disabled, " pr_warn("HW monitor is disabled, skipping\n");
"skipping\n");
goto EXIT; goto EXIT;
} }
*address = ((superio_inb(sio_cip, SIO_VT1211_BADDR) << 8) | *address = ((superio_inb(sio_cip, SIO_VT1211_BADDR) << 8) |
(superio_inb(sio_cip, SIO_VT1211_BADDR + 1))) & 0xff00; (superio_inb(sio_cip, SIO_VT1211_BADDR + 1))) & 0xff00;
if (*address == 0) { if (*address == 0) {
printk(KERN_WARNING DRVNAME ": Base address is not set, " pr_warn("Base address is not set, skipping\n");
"skipping\n");
goto EXIT; goto EXIT;
} }
err = 0; err = 0;
printk(KERN_INFO DRVNAME ": Found VT1211 chip at 0x%04x, " pr_info("Found VT1211 chip at 0x%04x, revision %u\n",
"revision %u\n", *address, *address, superio_inb(sio_cip, SIO_VT1211_DEVREV));
superio_inb(sio_cip, SIO_VT1211_DEVREV));
EXIT: EXIT:
superio_exit(sio_cip); superio_exit(sio_cip);
...@@ -1336,15 +1332,15 @@ static int __init vt1211_init(void) ...@@ -1336,15 +1332,15 @@ static int __init vt1211_init(void)
if ((uch_config < -1) || (uch_config > 31)) { if ((uch_config < -1) || (uch_config > 31)) {
err = -EINVAL; err = -EINVAL;
printk(KERN_WARNING DRVNAME ": Invalid UCH configuration %d. " pr_warn("Invalid UCH configuration %d. "
"Choose a value between 0 and 31.\n", uch_config); "Choose a value between 0 and 31.\n", uch_config);
goto EXIT; goto EXIT;
} }
if ((int_mode < -1) || (int_mode > 0)) { if ((int_mode < -1) || (int_mode > 0)) {
err = -EINVAL; err = -EINVAL;
printk(KERN_WARNING DRVNAME ": Invalid interrupt mode %d. " pr_warn("Invalid interrupt mode %d. "
"Only mode 0 is supported.\n", int_mode); "Only mode 0 is supported.\n", int_mode);
goto EXIT; goto EXIT;
} }
......
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