diff options
author | Joe Perches <joe@perches.com> | 2011-01-12 15:55:11 -0500 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2011-01-12 15:55:11 -0500 |
commit | 9e991c6fad4618a9158437f1f650225f9ec485c3 (patch) | |
tree | e4d1547059d766289bcb365c82a893e75f2c7149 /drivers/hwmon | |
parent | ce47da742ddd950197c29df6f9f89cf8adb5a0a1 (diff) |
hwmon: (pc87360) 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
[JD: Also convert debug messages]
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/pc87360.c | 53 |
1 files changed, 23 insertions, 30 deletions
diff --git a/drivers/hwmon/pc87360.c b/drivers/hwmon/pc87360.c index 68e69a49633c..3d99b8854d7c 100644 --- a/drivers/hwmon/pc87360.c +++ b/drivers/hwmon/pc87360.c | |||
@@ -33,6 +33,8 @@ | |||
33 | * the standard Super-I/O addresses is used (0x2E/0x2F or 0x4E/0x4F). | 33 | * the standard Super-I/O addresses is used (0x2E/0x2F or 0x4E/0x4F). |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
37 | |||
36 | #include <linux/module.h> | 38 | #include <linux/module.h> |
37 | #include <linux/init.h> | 39 | #include <linux/init.h> |
38 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
@@ -1031,16 +1033,15 @@ static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses | |||
1031 | 1033 | ||
1032 | val = superio_inb(sioaddr, ACT); | 1034 | val = superio_inb(sioaddr, ACT); |
1033 | if (!(val & 0x01)) { | 1035 | if (!(val & 0x01)) { |
1034 | printk(KERN_INFO "pc87360: Device 0x%02x not " | 1036 | pr_info("Device 0x%02x not activated\n", logdev[i]); |
1035 | "activated\n", logdev[i]); | ||
1036 | continue; | 1037 | continue; |
1037 | } | 1038 | } |
1038 | 1039 | ||
1039 | val = (superio_inb(sioaddr, BASE) << 8) | 1040 | val = (superio_inb(sioaddr, BASE) << 8) |
1040 | | superio_inb(sioaddr, BASE + 1); | 1041 | | superio_inb(sioaddr, BASE + 1); |
1041 | if (!val) { | 1042 | if (!val) { |
1042 | printk(KERN_INFO "pc87360: Base address not set for " | 1043 | pr_info("Base address not set for device 0x%02x\n", |
1043 | "device 0x%02x\n", logdev[i]); | 1044 | logdev[i]); |
1044 | continue; | 1045 | continue; |
1045 | } | 1046 | } |
1046 | 1047 | ||
@@ -1050,17 +1051,15 @@ static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses | |||
1050 | confreg[0] = superio_inb(sioaddr, 0xF0); | 1051 | confreg[0] = superio_inb(sioaddr, 0xF0); |
1051 | confreg[1] = superio_inb(sioaddr, 0xF1); | 1052 | confreg[1] = superio_inb(sioaddr, 0xF1); |
1052 | 1053 | ||
1053 | #ifdef DEBUG | 1054 | pr_debug("Fan %d: mon=%d ctrl=%d inv=%d\n", 1, |
1054 | printk(KERN_DEBUG "pc87360: Fan 1: mon=%d " | 1055 | (confreg[0] >> 2) & 1, (confreg[0] >> 3) & 1, |
1055 | "ctrl=%d inv=%d\n", (confreg[0]>>2)&1, | 1056 | (confreg[0] >> 4) & 1); |
1056 | (confreg[0]>>3)&1, (confreg[0]>>4)&1); | 1057 | pr_debug("Fan %d: mon=%d ctrl=%d inv=%d\n", 2, |
1057 | printk(KERN_DEBUG "pc87360: Fan 2: mon=%d " | 1058 | (confreg[0] >> 5) & 1, (confreg[0] >> 6) & 1, |
1058 | "ctrl=%d inv=%d\n", (confreg[0]>>5)&1, | 1059 | (confreg[0] >> 7) & 1); |
1059 | (confreg[0]>>6)&1, (confreg[0]>>7)&1); | 1060 | pr_debug("Fan %d: mon=%d ctrl=%d inv=%d\n", 3, |
1060 | printk(KERN_DEBUG "pc87360: Fan 3: mon=%d " | 1061 | confreg[1] & 1, (confreg[1] >> 1) & 1, |
1061 | "ctrl=%d inv=%d\n", confreg[1]&1, | 1062 | (confreg[1] >> 2) & 1); |
1062 | (confreg[1]>>1)&1, (confreg[1]>>2)&1); | ||
1063 | #endif | ||
1064 | } else if (i==1) { /* Voltages */ | 1063 | } else if (i==1) { /* Voltages */ |
1065 | /* Are we using thermistors? */ | 1064 | /* Are we using thermistors? */ |
1066 | if (*devid == 0xE9) { /* PC87366 */ | 1065 | if (*devid == 0xE9) { /* PC87366 */ |
@@ -1071,14 +1070,12 @@ static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses | |||
1071 | confreg[3] = superio_inb(sioaddr, 0x25); | 1070 | confreg[3] = superio_inb(sioaddr, 0x25); |
1072 | 1071 | ||
1073 | if (confreg[2] & 0x40) { | 1072 | if (confreg[2] & 0x40) { |
1074 | printk(KERN_INFO "pc87360: Using " | 1073 | pr_info("Using thermistors for " |
1075 | "thermistors for temperature " | 1074 | "temperature monitoring\n"); |
1076 | "monitoring\n"); | ||
1077 | } | 1075 | } |
1078 | if (confreg[3] & 0xE0) { | 1076 | if (confreg[3] & 0xE0) { |
1079 | printk(KERN_INFO "pc87360: VID " | 1077 | pr_info("VID inputs routed (mode %u)\n", |
1080 | "inputs routed (mode %u)\n", | 1078 | confreg[3] >> 5); |
1081 | confreg[3] >> 5); | ||
1082 | } | 1079 | } |
1083 | } | 1080 | } |
1084 | } | 1081 | } |
@@ -1616,7 +1613,7 @@ static int __init pc87360_device_add(unsigned short address) | |||
1616 | pdev = platform_device_alloc("pc87360", address); | 1613 | pdev = platform_device_alloc("pc87360", address); |
1617 | if (!pdev) { | 1614 | if (!pdev) { |
1618 | err = -ENOMEM; | 1615 | err = -ENOMEM; |
1619 | printk(KERN_ERR "pc87360: Device allocation failed\n"); | 1616 | pr_err("Device allocation failed\n"); |
1620 | goto exit; | 1617 | goto exit; |
1621 | } | 1618 | } |
1622 | 1619 | ||
@@ -1639,15 +1636,13 @@ static int __init pc87360_device_add(unsigned short address) | |||
1639 | 1636 | ||
1640 | err = platform_device_add_resources(pdev, res, res_count); | 1637 | err = platform_device_add_resources(pdev, res, res_count); |
1641 | if (err) { | 1638 | if (err) { |
1642 | printk(KERN_ERR "pc87360: Device resources addition failed " | 1639 | pr_err("Device resources addition failed (%d)\n", err); |
1643 | "(%d)\n", err); | ||
1644 | goto exit_device_put; | 1640 | goto exit_device_put; |
1645 | } | 1641 | } |
1646 | 1642 | ||
1647 | err = platform_device_add(pdev); | 1643 | err = platform_device_add(pdev); |
1648 | if (err) { | 1644 | if (err) { |
1649 | printk(KERN_ERR "pc87360: Device addition failed (%d)\n", | 1645 | pr_err("Device addition failed (%d)\n", err); |
1650 | err); | ||
1651 | goto exit_device_put; | 1646 | goto exit_device_put; |
1652 | } | 1647 | } |
1653 | 1648 | ||
@@ -1666,8 +1661,7 @@ static int __init pc87360_init(void) | |||
1666 | 1661 | ||
1667 | if (pc87360_find(0x2e, &devid, extra_isa) | 1662 | if (pc87360_find(0x2e, &devid, extra_isa) |
1668 | && pc87360_find(0x4e, &devid, extra_isa)) { | 1663 | && pc87360_find(0x4e, &devid, extra_isa)) { |
1669 | printk(KERN_WARNING "pc87360: PC8736x not detected, " | 1664 | pr_warn("PC8736x not detected, module not inserted\n"); |
1670 | "module not inserted.\n"); | ||
1671 | return -ENODEV; | 1665 | return -ENODEV; |
1672 | } | 1666 | } |
1673 | 1667 | ||
@@ -1680,8 +1674,7 @@ static int __init pc87360_init(void) | |||
1680 | } | 1674 | } |
1681 | 1675 | ||
1682 | if (address == 0x0000) { | 1676 | if (address == 0x0000) { |
1683 | printk(KERN_WARNING "pc87360: No active logical device, " | 1677 | pr_warn("No active logical device, module not inserted\n"); |
1684 | "module not inserted.\n"); | ||
1685 | return -ENODEV; | 1678 | return -ENODEV; |
1686 | } | 1679 | } |
1687 | 1680 | ||