aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/f71805f.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-10-20 02:51:33 -0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-01-08 13:55:07 -0500
commite54c5ad61f4e2c4fdfbdb8dff31fc604073d3550 (patch)
tree6eb20c18922e7dec74c2050c85d9b02600c693af /drivers/hwmon/f71805f.c
parent9c6e13b411cf0f656b7d7a78ec35bf0069f631bb (diff)
hwmon: (f71805f) 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/f71805f.c')
-rw-r--r--drivers/hwmon/f71805f.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c
index 525a00bd70b1..92f949767ece 100644
--- a/drivers/hwmon/f71805f.c
+++ b/drivers/hwmon/f71805f.c
@@ -28,6 +28,8 @@
28 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 28 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 */ 29 */
30 30
31#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
32
31#include <linux/module.h> 33#include <linux/module.h>
32#include <linux/init.h> 34#include <linux/init.h>
33#include <linux/slab.h> 35#include <linux/slab.h>
@@ -1309,7 +1311,7 @@ static int __devinit f71805f_probe(struct platform_device *pdev)
1309 1311
1310 if (!(data = kzalloc(sizeof(struct f71805f_data), GFP_KERNEL))) { 1312 if (!(data = kzalloc(sizeof(struct f71805f_data), GFP_KERNEL))) {
1311 err = -ENOMEM; 1313 err = -ENOMEM;
1312 printk(KERN_ERR DRVNAME ": Out of memory\n"); 1314 pr_err("Out of memory\n");
1313 goto exit; 1315 goto exit;
1314 } 1316 }
1315 1317
@@ -1451,7 +1453,7 @@ static int __init f71805f_device_add(unsigned short address,
1451 pdev = platform_device_alloc(DRVNAME, address); 1453 pdev = platform_device_alloc(DRVNAME, address);
1452 if (!pdev) { 1454 if (!pdev) {
1453 err = -ENOMEM; 1455 err = -ENOMEM;
1454 printk(KERN_ERR DRVNAME ": Device allocation failed\n"); 1456 pr_err("Device allocation failed\n");
1455 goto exit; 1457 goto exit;
1456 } 1458 }
1457 1459
@@ -1462,22 +1464,20 @@ static int __init f71805f_device_add(unsigned short address,
1462 1464
1463 err = platform_device_add_resources(pdev, &res, 1); 1465 err = platform_device_add_resources(pdev, &res, 1);
1464 if (err) { 1466 if (err) {
1465 printk(KERN_ERR DRVNAME ": Device resource addition failed " 1467 pr_err("Device resource addition failed (%d)\n", err);
1466 "(%d)\n", err);
1467 goto exit_device_put; 1468 goto exit_device_put;
1468 } 1469 }
1469 1470
1470 err = platform_device_add_data(pdev, sio_data, 1471 err = platform_device_add_data(pdev, sio_data,
1471 sizeof(struct f71805f_sio_data)); 1472 sizeof(struct f71805f_sio_data));
1472 if (err) { 1473 if (err) {
1473 printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); 1474 pr_err("Platform data allocation failed\n");
1474 goto exit_device_put; 1475 goto exit_device_put;
1475 } 1476 }
1476 1477
1477 err = platform_device_add(pdev); 1478 err = platform_device_add(pdev);
1478 if (err) { 1479 if (err) {
1479 printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", 1480 pr_err("Device addition failed (%d)\n", err);
1480 err);
1481 goto exit_device_put; 1481 goto exit_device_put;
1482 } 1482 }
1483 1483
@@ -1516,30 +1516,27 @@ static int __init f71805f_find(int sioaddr, unsigned short *address,
1516 sio_data->fnsel1 = superio_inb(sioaddr, SIO_REG_FNSEL1); 1516 sio_data->fnsel1 = superio_inb(sioaddr, SIO_REG_FNSEL1);
1517 break; 1517 break;
1518 default: 1518 default:
1519 printk(KERN_INFO DRVNAME ": Unsupported Fintek device, " 1519 pr_info("Unsupported Fintek device, skipping\n");
1520 "skipping\n");
1521 goto exit; 1520 goto exit;
1522 } 1521 }
1523 1522
1524 superio_select(sioaddr, F71805F_LD_HWM); 1523 superio_select(sioaddr, F71805F_LD_HWM);
1525 if (!(superio_inb(sioaddr, SIO_REG_ENABLE) & 0x01)) { 1524 if (!(superio_inb(sioaddr, SIO_REG_ENABLE) & 0x01)) {
1526 printk(KERN_WARNING DRVNAME ": Device not activated, " 1525 pr_warn("Device not activated, skipping\n");
1527 "skipping\n");
1528 goto exit; 1526 goto exit;
1529 } 1527 }
1530 1528
1531 *address = superio_inw(sioaddr, SIO_REG_ADDR); 1529 *address = superio_inw(sioaddr, SIO_REG_ADDR);
1532 if (*address == 0) { 1530 if (*address == 0) {
1533 printk(KERN_WARNING DRVNAME ": Base address not set, " 1531 pr_warn("Base address not set, skipping\n");
1534 "skipping\n");
1535 goto exit; 1532 goto exit;
1536 } 1533 }
1537 *address &= ~(REGION_LENGTH - 1); /* Ignore 3 LSB */ 1534 *address &= ~(REGION_LENGTH - 1); /* Ignore 3 LSB */
1538 1535
1539 err = 0; 1536 err = 0;
1540 printk(KERN_INFO DRVNAME ": Found %s chip at %#x, revision %u\n", 1537 pr_info("Found %s chip at %#x, revision %u\n",
1541 names[sio_data->kind], *address, 1538 names[sio_data->kind], *address,
1542 superio_inb(sioaddr, SIO_REG_DEVREV)); 1539 superio_inb(sioaddr, SIO_REG_DEVREV));
1543 1540
1544exit: 1541exit:
1545 superio_exit(sioaddr); 1542 superio_exit(sioaddr);