aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-01-12 15:55:11 -0500
committerJean Delvare <khali@endymion.delvare>2011-01-12 15:55:11 -0500
commit5e24e0c365e0f83f9a6f5adb3bd0cf5ca5cd8ab1 (patch)
treeffeb632700e12cf897c9782f848d7dcdd60dd233 /drivers/hwmon
parent9e991c6fad4618a9158437f1f650225f9ec485c3 (diff)
hwmon: (pc87427) 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: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/pc87427.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/hwmon/pc87427.c b/drivers/hwmon/pc87427.c
index 9ec4daaf6ca6..8da2181630b1 100644
--- a/drivers/hwmon/pc87427.c
+++ b/drivers/hwmon/pc87427.c
@@ -22,6 +22,8 @@
22 * mode, and voltages aren't supported at all. 22 * mode, and voltages aren't supported at all.
23 */ 23 */
24 24
25#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
26
25#include <linux/module.h> 27#include <linux/module.h>
26#include <linux/init.h> 28#include <linux/init.h>
27#include <linux/slab.h> 29#include <linux/slab.h>
@@ -1077,7 +1079,7 @@ static int __devinit pc87427_probe(struct platform_device *pdev)
1077 data = kzalloc(sizeof(struct pc87427_data), GFP_KERNEL); 1079 data = kzalloc(sizeof(struct pc87427_data), GFP_KERNEL);
1078 if (!data) { 1080 if (!data) {
1079 err = -ENOMEM; 1081 err = -ENOMEM;
1080 printk(KERN_ERR DRVNAME ": Out of memory\n"); 1082 pr_err("Out of memory\n");
1081 goto exit; 1083 goto exit;
1082 } 1084 }
1083 1085
@@ -1196,28 +1198,26 @@ static int __init pc87427_device_add(const struct pc87427_sio_data *sio_data)
1196 pdev = platform_device_alloc(DRVNAME, res[0].start); 1198 pdev = platform_device_alloc(DRVNAME, res[0].start);
1197 if (!pdev) { 1199 if (!pdev) {
1198 err = -ENOMEM; 1200 err = -ENOMEM;
1199 printk(KERN_ERR DRVNAME ": Device allocation failed\n"); 1201 pr_err("Device allocation failed\n");
1200 goto exit; 1202 goto exit;
1201 } 1203 }
1202 1204
1203 err = platform_device_add_resources(pdev, res, res_count); 1205 err = platform_device_add_resources(pdev, res, res_count);
1204 if (err) { 1206 if (err) {
1205 printk(KERN_ERR DRVNAME ": Device resource addition failed " 1207 pr_err("Device resource addition failed (%d)\n", err);
1206 "(%d)\n", err);
1207 goto exit_device_put; 1208 goto exit_device_put;
1208 } 1209 }
1209 1210
1210 err = platform_device_add_data(pdev, sio_data, 1211 err = platform_device_add_data(pdev, sio_data,
1211 sizeof(struct pc87427_sio_data)); 1212 sizeof(struct pc87427_sio_data));
1212 if (err) { 1213 if (err) {
1213 printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); 1214 pr_err("Platform data allocation failed\n");
1214 goto exit_device_put; 1215 goto exit_device_put;
1215 } 1216 }
1216 1217
1217 err = platform_device_add(pdev); 1218 err = platform_device_add(pdev);
1218 if (err) { 1219 if (err) {
1219 printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", 1220 pr_err("Device addition failed (%d)\n", err);
1220 err);
1221 goto exit_device_put; 1221 goto exit_device_put;
1222 } 1222 }
1223 1223
@@ -1249,23 +1249,23 @@ static int __init pc87427_find(int sioaddr, struct pc87427_sio_data *sio_data)
1249 1249
1250 val = superio_inb(sioaddr, SIOREG_ACT); 1250 val = superio_inb(sioaddr, SIOREG_ACT);
1251 if (!(val & 0x01)) { 1251 if (!(val & 0x01)) {
1252 printk(KERN_INFO DRVNAME ": Logical device 0x%02x " 1252 pr_info("Logical device 0x%02x not activated\n",
1253 "not activated\n", logdev[i]); 1253 logdev[i]);
1254 continue; 1254 continue;
1255 } 1255 }
1256 1256
1257 val = superio_inb(sioaddr, SIOREG_MAP); 1257 val = superio_inb(sioaddr, SIOREG_MAP);
1258 if (val & 0x01) { 1258 if (val & 0x01) {
1259 printk(KERN_WARNING DRVNAME ": Logical device 0x%02x " 1259 pr_warn("Logical device 0x%02x is memory-mapped, "
1260 "is memory-mapped, can't use\n", logdev[i]); 1260 "can't use\n", logdev[i]);
1261 continue; 1261 continue;
1262 } 1262 }
1263 1263
1264 val = (superio_inb(sioaddr, SIOREG_IOBASE) << 8) 1264 val = (superio_inb(sioaddr, SIOREG_IOBASE) << 8)
1265 | superio_inb(sioaddr, SIOREG_IOBASE + 1); 1265 | superio_inb(sioaddr, SIOREG_IOBASE + 1);
1266 if (!val) { 1266 if (!val) {
1267 printk(KERN_INFO DRVNAME ": I/O base address not set " 1267 pr_info("I/O base address not set for logical device "
1268 "for logical device 0x%02x\n", logdev[i]); 1268 "0x%02x\n", logdev[i]);
1269 continue; 1269 continue;
1270 } 1270 }
1271 sio_data->address[i] = val; 1271 sio_data->address[i] = val;