Commit 5ed9ba6b87545d21b48e50a028bfb79f9812f89f

Authored by Joe Perches
Committed by Guenter Roeck
1 parent 774f7827e1

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>

Showing 1 changed file with 13 additions and 17 deletions Side-by-side Diff

drivers/hwmon/vt1211.c
... ... @@ -21,6 +21,8 @@
21 21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 22 */
23 23  
  24 +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  25 +
24 26 #include <linux/module.h>
25 27 #include <linux/init.h>
26 28 #include <linux/slab.h>
... ... @@ -1254,8 +1256,7 @@
1254 1256 pdev = platform_device_alloc(DRVNAME, address);
1255 1257 if (!pdev) {
1256 1258 err = -ENOMEM;
1257   - printk(KERN_ERR DRVNAME ": Device allocation failed (%d)\n",
1258   - err);
  1259 + pr_err("Device allocation failed (%d)\n", err);
1259 1260 goto EXIT;
1260 1261 }
1261 1262  
1262 1263  
... ... @@ -1266,15 +1267,13 @@
1266 1267  
1267 1268 err = platform_device_add_resources(pdev, &res, 1);
1268 1269 if (err) {
1269   - printk(KERN_ERR DRVNAME ": Device resource addition failed "
1270   - "(%d)\n", err);
  1270 + pr_err("Device resource addition failed (%d)\n", err);
1271 1271 goto EXIT_DEV_PUT;
1272 1272 }
1273 1273  
1274 1274 err = platform_device_add(pdev);
1275 1275 if (err) {
1276   - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n",
1277   - err);
  1276 + pr_err("Device addition failed (%d)\n", err);
1278 1277 goto EXIT_DEV_PUT;
1279 1278 }
1280 1279  
1281 1280  
1282 1281  
... ... @@ -1301,23 +1300,20 @@
1301 1300 superio_select(sio_cip, SIO_VT1211_LDN_HWMON);
1302 1301  
1303 1302 if ((superio_inb(sio_cip, SIO_VT1211_ACTIVE) & 1) == 0) {
1304   - printk(KERN_WARNING DRVNAME ": HW monitor is disabled, "
1305   - "skipping\n");
  1303 + pr_warn("HW monitor is disabled, skipping\n");
1306 1304 goto EXIT;
1307 1305 }
1308 1306  
1309 1307 *address = ((superio_inb(sio_cip, SIO_VT1211_BADDR) << 8) |
1310 1308 (superio_inb(sio_cip, SIO_VT1211_BADDR + 1))) & 0xff00;
1311 1309 if (*address == 0) {
1312   - printk(KERN_WARNING DRVNAME ": Base address is not set, "
1313   - "skipping\n");
  1310 + pr_warn("Base address is not set, skipping\n");
1314 1311 goto EXIT;
1315 1312 }
1316 1313  
1317 1314 err = 0;
1318   - printk(KERN_INFO DRVNAME ": Found VT1211 chip at 0x%04x, "
1319   - "revision %u\n", *address,
1320   - superio_inb(sio_cip, SIO_VT1211_DEVREV));
  1315 + pr_info("Found VT1211 chip at 0x%04x, revision %u\n",
  1316 + *address, superio_inb(sio_cip, SIO_VT1211_DEVREV));
1321 1317  
1322 1318 EXIT:
1323 1319 superio_exit(sio_cip);
1324 1320  
... ... @@ -1336,15 +1332,15 @@
1336 1332  
1337 1333 if ((uch_config < -1) || (uch_config > 31)) {
1338 1334 err = -EINVAL;
1339   - printk(KERN_WARNING DRVNAME ": Invalid UCH configuration %d. "
1340   - "Choose a value between 0 and 31.\n", uch_config);
  1335 + pr_warn("Invalid UCH configuration %d. "
  1336 + "Choose a value between 0 and 31.\n", uch_config);
1341 1337 goto EXIT;
1342 1338 }
1343 1339  
1344 1340 if ((int_mode < -1) || (int_mode > 0)) {
1345 1341 err = -EINVAL;
1346   - printk(KERN_WARNING DRVNAME ": Invalid interrupt mode %d. "
1347   - "Only mode 0 is supported.\n", int_mode);
  1342 + pr_warn("Invalid interrupt mode %d. "
  1343 + "Only mode 0 is supported.\n", int_mode);
1348 1344 goto EXIT;
1349 1345 }
1350 1346