Commit 5e24e0c3 authored by Joe Perches's avatar Joe Perches Committed by Jean Delvare

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 9e991c6f
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
* mode, and voltages aren't supported at all. * mode, and voltages aren't supported at all.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -1077,7 +1079,7 @@ static int __devinit pc87427_probe(struct platform_device *pdev) ...@@ -1077,7 +1079,7 @@ static int __devinit pc87427_probe(struct platform_device *pdev)
data = kzalloc(sizeof(struct pc87427_data), GFP_KERNEL); data = kzalloc(sizeof(struct pc87427_data), GFP_KERNEL);
if (!data) { if (!data) {
err = -ENOMEM; err = -ENOMEM;
printk(KERN_ERR DRVNAME ": Out of memory\n"); pr_err("Out of memory\n");
goto exit; goto exit;
} }
...@@ -1196,28 +1198,26 @@ static int __init pc87427_device_add(const struct pc87427_sio_data *sio_data) ...@@ -1196,28 +1198,26 @@ static int __init pc87427_device_add(const struct pc87427_sio_data *sio_data)
pdev = platform_device_alloc(DRVNAME, res[0].start); pdev = platform_device_alloc(DRVNAME, res[0].start);
if (!pdev) { if (!pdev) {
err = -ENOMEM; err = -ENOMEM;
printk(KERN_ERR DRVNAME ": Device allocation failed\n"); pr_err("Device allocation failed\n");
goto exit; goto exit;
} }
err = platform_device_add_resources(pdev, res, res_count); err = platform_device_add_resources(pdev, res, res_count);
if (err) { if (err) {
printk(KERN_ERR DRVNAME ": Device resource addition failed " pr_err("Device resource addition failed (%d)\n", err);
"(%d)\n", err);
goto exit_device_put; goto exit_device_put;
} }
err = platform_device_add_data(pdev, sio_data, err = platform_device_add_data(pdev, sio_data,
sizeof(struct pc87427_sio_data)); sizeof(struct pc87427_sio_data));
if (err) { if (err) {
printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); pr_err("Platform data allocation failed\n");
goto exit_device_put; goto exit_device_put;
} }
err = platform_device_add(pdev); err = platform_device_add(pdev);
if (err) { if (err) {
printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", pr_err("Device addition failed (%d)\n", err);
err);
goto exit_device_put; goto exit_device_put;
} }
...@@ -1249,23 +1249,23 @@ static int __init pc87427_find(int sioaddr, struct pc87427_sio_data *sio_data) ...@@ -1249,23 +1249,23 @@ static int __init pc87427_find(int sioaddr, struct pc87427_sio_data *sio_data)
val = superio_inb(sioaddr, SIOREG_ACT); val = superio_inb(sioaddr, SIOREG_ACT);
if (!(val & 0x01)) { if (!(val & 0x01)) {
printk(KERN_INFO DRVNAME ": Logical device 0x%02x " pr_info("Logical device 0x%02x not activated\n",
"not activated\n", logdev[i]); logdev[i]);
continue; continue;
} }
val = superio_inb(sioaddr, SIOREG_MAP); val = superio_inb(sioaddr, SIOREG_MAP);
if (val & 0x01) { if (val & 0x01) {
printk(KERN_WARNING DRVNAME ": Logical device 0x%02x " pr_warn("Logical device 0x%02x is memory-mapped, "
"is memory-mapped, can't use\n", logdev[i]); "can't use\n", logdev[i]);
continue; continue;
} }
val = (superio_inb(sioaddr, SIOREG_IOBASE) << 8) val = (superio_inb(sioaddr, SIOREG_IOBASE) << 8)
| superio_inb(sioaddr, SIOREG_IOBASE + 1); | superio_inb(sioaddr, SIOREG_IOBASE + 1);
if (!val) { if (!val) {
printk(KERN_INFO DRVNAME ": I/O base address not set " pr_info("I/O base address not set for logical device "
"for logical device 0x%02x\n", logdev[i]); "0x%02x\n", logdev[i]);
continue; continue;
} }
sio_data->address[i] = val; sio_data->address[i] = val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment