Commit 14a613cc23869d0ca69154bbc5816004fe201b17

Authored by Joe Perches
Committed by Guenter Roeck
1 parent 2caec1343e

hwmon: (pkgtemp) 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: Guenter Roeck <guenter.roeck@ericsson.com>

Showing 1 changed file with 4 additions and 3 deletions Side-by-side Diff

drivers/hwmon/pkgtemp.c
... ... @@ -20,6 +20,8 @@
20 20 * 02110-1301 USA.
21 21 */
22 22  
  23 +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  24 +
23 25 #include <linux/module.h>
24 26 #include <linux/init.h>
25 27 #include <linux/slab.h>
... ... @@ -303,7 +305,7 @@
303 305 pdev = platform_device_alloc(DRVNAME, cpu);
304 306 if (!pdev) {
305 307 err = -ENOMEM;
306   - printk(KERN_ERR DRVNAME ": Device allocation failed\n");
  308 + pr_err("Device allocation failed\n");
307 309 goto exit;
308 310 }
309 311  
... ... @@ -315,8 +317,7 @@
315 317  
316 318 err = platform_device_add(pdev);
317 319 if (err) {
318   - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n",
319   - err);
  320 + pr_err("Device addition failed (%d)\n", err);
320 321 goto exit_device_free;
321 322 }
322 323