diff options
author | Joe Perches <joe@perches.com> | 2010-10-20 02:51:52 -0400 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-01-08 13:55:30 -0500 |
commit | 5ed9ba6b87545d21b48e50a028bfb79f9812f89f (patch) | |
tree | 2a49059d66af4eb9359f02e9d502372627e1329f /drivers/hwmon | |
parent | 774f7827e13cfae720306ca44b83b93ab2a6b9be (diff) |
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: Joe Perches <joe@perches.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/vt1211.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/drivers/hwmon/vt1211.c b/drivers/hwmon/vt1211.c index ae33bbb577c7..49163d48e966 100644 --- a/drivers/hwmon/vt1211.c +++ b/drivers/hwmon/vt1211.c | |||
@@ -21,6 +21,8 @@ | |||
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
25 | |||
24 | #include <linux/module.h> | 26 | #include <linux/module.h> |
25 | #include <linux/init.h> | 27 | #include <linux/init.h> |
26 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
@@ -1254,8 +1256,7 @@ static int __init vt1211_device_add(unsigned short address) | |||
1254 | pdev = platform_device_alloc(DRVNAME, address); | 1256 | pdev = platform_device_alloc(DRVNAME, address); |
1255 | if (!pdev) { | 1257 | if (!pdev) { |
1256 | err = -ENOMEM; | 1258 | err = -ENOMEM; |
1257 | printk(KERN_ERR DRVNAME ": Device allocation failed (%d)\n", | 1259 | pr_err("Device allocation failed (%d)\n", err); |
1258 | err); | ||
1259 | goto EXIT; | 1260 | goto EXIT; |
1260 | } | 1261 | } |
1261 | 1262 | ||
@@ -1266,15 +1267,13 @@ static int __init vt1211_device_add(unsigned short address) | |||
1266 | 1267 | ||
1267 | err = platform_device_add_resources(pdev, &res, 1); | 1268 | err = platform_device_add_resources(pdev, &res, 1); |
1268 | if (err) { | 1269 | if (err) { |
1269 | printk(KERN_ERR DRVNAME ": Device resource addition failed " | 1270 | pr_err("Device resource addition failed (%d)\n", err); |
1270 | "(%d)\n", err); | ||
1271 | goto EXIT_DEV_PUT; | 1271 | goto EXIT_DEV_PUT; |
1272 | } | 1272 | } |
1273 | 1273 | ||
1274 | err = platform_device_add(pdev); | 1274 | err = platform_device_add(pdev); |
1275 | if (err) { | 1275 | if (err) { |
1276 | printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", | 1276 | pr_err("Device addition failed (%d)\n", err); |
1277 | err); | ||
1278 | goto EXIT_DEV_PUT; | 1277 | goto EXIT_DEV_PUT; |
1279 | } | 1278 | } |
1280 | 1279 | ||
@@ -1301,23 +1300,20 @@ static int __init vt1211_find(int sio_cip, unsigned short *address) | |||
1301 | superio_select(sio_cip, SIO_VT1211_LDN_HWMON); | 1300 | superio_select(sio_cip, SIO_VT1211_LDN_HWMON); |
1302 | 1301 | ||
1303 | if ((superio_inb(sio_cip, SIO_VT1211_ACTIVE) & 1) == 0) { | 1302 | if ((superio_inb(sio_cip, SIO_VT1211_ACTIVE) & 1) == 0) { |
1304 | printk(KERN_WARNING DRVNAME ": HW monitor is disabled, " | 1303 | pr_warn("HW monitor is disabled, skipping\n"); |
1305 | "skipping\n"); | ||
1306 | goto EXIT; | 1304 | goto EXIT; |
1307 | } | 1305 | } |
1308 | 1306 | ||
1309 | *address = ((superio_inb(sio_cip, SIO_VT1211_BADDR) << 8) | | 1307 | *address = ((superio_inb(sio_cip, SIO_VT1211_BADDR) << 8) | |
1310 | (superio_inb(sio_cip, SIO_VT1211_BADDR + 1))) & 0xff00; | 1308 | (superio_inb(sio_cip, SIO_VT1211_BADDR + 1))) & 0xff00; |
1311 | if (*address == 0) { | 1309 | if (*address == 0) { |
1312 | printk(KERN_WARNING DRVNAME ": Base address is not set, " | 1310 | pr_warn("Base address is not set, skipping\n"); |
1313 | "skipping\n"); | ||
1314 | goto EXIT; | 1311 | goto EXIT; |
1315 | } | 1312 | } |
1316 | 1313 | ||
1317 | err = 0; | 1314 | err = 0; |
1318 | printk(KERN_INFO DRVNAME ": Found VT1211 chip at 0x%04x, " | 1315 | pr_info("Found VT1211 chip at 0x%04x, revision %u\n", |
1319 | "revision %u\n", *address, | 1316 | *address, superio_inb(sio_cip, SIO_VT1211_DEVREV)); |
1320 | superio_inb(sio_cip, SIO_VT1211_DEVREV)); | ||
1321 | 1317 | ||
1322 | EXIT: | 1318 | EXIT: |
1323 | superio_exit(sio_cip); | 1319 | superio_exit(sio_cip); |
@@ -1336,15 +1332,15 @@ static int __init vt1211_init(void) | |||
1336 | 1332 | ||
1337 | if ((uch_config < -1) || (uch_config > 31)) { | 1333 | if ((uch_config < -1) || (uch_config > 31)) { |
1338 | err = -EINVAL; | 1334 | err = -EINVAL; |
1339 | printk(KERN_WARNING DRVNAME ": Invalid UCH configuration %d. " | 1335 | pr_warn("Invalid UCH configuration %d. " |
1340 | "Choose a value between 0 and 31.\n", uch_config); | 1336 | "Choose a value between 0 and 31.\n", uch_config); |
1341 | goto EXIT; | 1337 | goto EXIT; |
1342 | } | 1338 | } |
1343 | 1339 | ||
1344 | if ((int_mode < -1) || (int_mode > 0)) { | 1340 | if ((int_mode < -1) || (int_mode > 0)) { |
1345 | err = -EINVAL; | 1341 | err = -EINVAL; |
1346 | printk(KERN_WARNING DRVNAME ": Invalid interrupt mode %d. " | 1342 | pr_warn("Invalid interrupt mode %d. " |
1347 | "Only mode 0 is supported.\n", int_mode); | 1343 | "Only mode 0 is supported.\n", int_mode); |
1348 | goto EXIT; | 1344 | goto EXIT; |
1349 | } | 1345 | } |
1350 | 1346 | ||