Commit ce47da74 authored by Joe Perches's avatar Joe Perches Committed by Jean Delvare

hwmon: (lm78) 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 a8ca1037
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#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>
...@@ -858,7 +860,7 @@ static int __init lm78_isa_found(unsigned short address) ...@@ -858,7 +860,7 @@ static int __init lm78_isa_found(unsigned short address)
* individually for the probing phase. */ * individually for the probing phase. */
for (port = address; port < address + LM78_EXTENT; port++) { for (port = address; port < address + LM78_EXTENT; port++) {
if (!request_region(port, 1, "lm78")) { if (!request_region(port, 1, "lm78")) {
pr_debug("lm78: Failed to request port 0x%x\n", port); pr_debug("Failed to request port 0x%x\n", port);
goto release; goto release;
} }
} }
...@@ -920,7 +922,7 @@ static int __init lm78_isa_found(unsigned short address) ...@@ -920,7 +922,7 @@ static int __init lm78_isa_found(unsigned short address)
found = 1; found = 1;
if (found) if (found)
pr_info("lm78: Found an %s chip at %#x\n", pr_info("Found an %s chip at %#x\n",
val & 0x80 ? "LM79" : "LM78", (int)address); val & 0x80 ? "LM79" : "LM78", (int)address);
release: release:
...@@ -942,21 +944,19 @@ static int __init lm78_isa_device_add(unsigned short address) ...@@ -942,21 +944,19 @@ static int __init lm78_isa_device_add(unsigned short address)
pdev = platform_device_alloc("lm78", address); pdev = platform_device_alloc("lm78", address);
if (!pdev) { if (!pdev) {
err = -ENOMEM; err = -ENOMEM;
printk(KERN_ERR "lm78: Device allocation failed\n"); pr_err("Device allocation failed\n");
goto exit; goto exit;
} }
err = platform_device_add_resources(pdev, &res, 1); err = platform_device_add_resources(pdev, &res, 1);
if (err) { if (err) {
printk(KERN_ERR "lm78: 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(pdev); err = platform_device_add(pdev);
if (err) { if (err) {
printk(KERN_ERR "lm78: Device addition failed (%d)\n", pr_err("Device addition failed (%d)\n", err);
err);
goto exit_device_put; goto exit_device_put;
} }
......
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