Commit ce47da742ddd950197c29df6f9f89cf8adb5a0a1

Authored by Joe Perches
Committed by Jean Delvare
1 parent a8ca103793

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: Joe Perches <joe@perches.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>

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

drivers/hwmon/lm78.c
... ... @@ -19,6 +19,8 @@
19 19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 20 */
21 21  
  22 +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  23 +
22 24 #include <linux/module.h>
23 25 #include <linux/init.h>
24 26 #include <linux/slab.h>
... ... @@ -858,7 +860,7 @@
858 860 * individually for the probing phase. */
859 861 for (port = address; port < address + LM78_EXTENT; port++) {
860 862 if (!request_region(port, 1, "lm78")) {
861   - pr_debug("lm78: Failed to request port 0x%x\n", port);
  863 + pr_debug("Failed to request port 0x%x\n", port);
862 864 goto release;
863 865 }
864 866 }
... ... @@ -920,7 +922,7 @@
920 922 found = 1;
921 923  
922 924 if (found)
923   - pr_info("lm78: Found an %s chip at %#x\n",
  925 + pr_info("Found an %s chip at %#x\n",
924 926 val & 0x80 ? "LM79" : "LM78", (int)address);
925 927  
926 928 release:
927 929  
928 930  
... ... @@ -942,21 +944,19 @@
942 944 pdev = platform_device_alloc("lm78", address);
943 945 if (!pdev) {
944 946 err = -ENOMEM;
945   - printk(KERN_ERR "lm78: Device allocation failed\n");
  947 + pr_err("Device allocation failed\n");
946 948 goto exit;
947 949 }
948 950  
949 951 err = platform_device_add_resources(pdev, &res, 1);
950 952 if (err) {
951   - printk(KERN_ERR "lm78: Device resource addition failed "
952   - "(%d)\n", err);
  953 + pr_err("Device resource addition failed (%d)\n", err);
953 954 goto exit_device_put;
954 955 }
955 956  
956 957 err = platform_device_add(pdev);
957 958 if (err) {
958   - printk(KERN_ERR "lm78: Device addition failed (%d)\n",
959   - err);
  959 + pr_err("Device addition failed (%d)\n", err);
960 960 goto exit_device_put;
961 961 }
962 962