Commit 5e24e0c365e0f83f9a6f5adb3bd0cf5ca5cd8ab1
Committed by
Jean Delvare
1 parent
9e991c6fad
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 13 additions and 13 deletions Side-by-side Diff
drivers/hwmon/pc87427.c
... | ... | @@ -22,6 +22,8 @@ |
22 | 22 | * mode, and voltages aren't supported at all. |
23 | 23 | */ |
24 | 24 | |
25 | +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | |
26 | + | |
25 | 27 | #include <linux/module.h> |
26 | 28 | #include <linux/init.h> |
27 | 29 | #include <linux/slab.h> |
... | ... | @@ -1077,7 +1079,7 @@ |
1077 | 1079 | data = kzalloc(sizeof(struct pc87427_data), GFP_KERNEL); |
1078 | 1080 | if (!data) { |
1079 | 1081 | err = -ENOMEM; |
1080 | - printk(KERN_ERR DRVNAME ": Out of memory\n"); | |
1082 | + pr_err("Out of memory\n"); | |
1081 | 1083 | goto exit; |
1082 | 1084 | } |
1083 | 1085 | |
1084 | 1086 | |
1085 | 1087 | |
1086 | 1088 | |
... | ... | @@ -1196,28 +1198,26 @@ |
1196 | 1198 | pdev = platform_device_alloc(DRVNAME, res[0].start); |
1197 | 1199 | if (!pdev) { |
1198 | 1200 | err = -ENOMEM; |
1199 | - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); | |
1201 | + pr_err("Device allocation failed\n"); | |
1200 | 1202 | goto exit; |
1201 | 1203 | } |
1202 | 1204 | |
1203 | 1205 | err = platform_device_add_resources(pdev, res, res_count); |
1204 | 1206 | if (err) { |
1205 | - printk(KERN_ERR DRVNAME ": Device resource addition failed " | |
1206 | - "(%d)\n", err); | |
1207 | + pr_err("Device resource addition failed (%d)\n", err); | |
1207 | 1208 | goto exit_device_put; |
1208 | 1209 | } |
1209 | 1210 | |
1210 | 1211 | err = platform_device_add_data(pdev, sio_data, |
1211 | 1212 | sizeof(struct pc87427_sio_data)); |
1212 | 1213 | if (err) { |
1213 | - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); | |
1214 | + pr_err("Platform data allocation failed\n"); | |
1214 | 1215 | goto exit_device_put; |
1215 | 1216 | } |
1216 | 1217 | |
1217 | 1218 | err = platform_device_add(pdev); |
1218 | 1219 | if (err) { |
1219 | - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", | |
1220 | - err); | |
1220 | + pr_err("Device addition failed (%d)\n", err); | |
1221 | 1221 | goto exit_device_put; |
1222 | 1222 | } |
1223 | 1223 | |
1224 | 1224 | |
1225 | 1225 | |
... | ... | @@ -1249,23 +1249,23 @@ |
1249 | 1249 | |
1250 | 1250 | val = superio_inb(sioaddr, SIOREG_ACT); |
1251 | 1251 | if (!(val & 0x01)) { |
1252 | - printk(KERN_INFO DRVNAME ": Logical device 0x%02x " | |
1253 | - "not activated\n", logdev[i]); | |
1252 | + pr_info("Logical device 0x%02x not activated\n", | |
1253 | + logdev[i]); | |
1254 | 1254 | continue; |
1255 | 1255 | } |
1256 | 1256 | |
1257 | 1257 | val = superio_inb(sioaddr, SIOREG_MAP); |
1258 | 1258 | if (val & 0x01) { |
1259 | - printk(KERN_WARNING DRVNAME ": Logical device 0x%02x " | |
1260 | - "is memory-mapped, can't use\n", logdev[i]); | |
1259 | + pr_warn("Logical device 0x%02x is memory-mapped, " | |
1260 | + "can't use\n", logdev[i]); | |
1261 | 1261 | continue; |
1262 | 1262 | } |
1263 | 1263 | |
1264 | 1264 | val = (superio_inb(sioaddr, SIOREG_IOBASE) << 8) |
1265 | 1265 | | superio_inb(sioaddr, SIOREG_IOBASE + 1); |
1266 | 1266 | if (!val) { |
1267 | - printk(KERN_INFO DRVNAME ": I/O base address not set " | |
1268 | - "for logical device 0x%02x\n", logdev[i]); | |
1267 | + pr_info("I/O base address not set for logical device " | |
1268 | + "0x%02x\n", logdev[i]); | |
1269 | 1269 | continue; |
1270 | 1270 | } |
1271 | 1271 | sio_data->address[i] = val; |