Commit 18de030f1dbaef0c13cf393899a298d978aa200f
Committed by
Guenter Roeck
1 parent
abdc6fd189
Exists in
master
and in
4 other branches
hwmon: (w83627hf) 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 8 additions and 9 deletions Side-by-side Diff
drivers/hwmon/w83627hf.c
... | ... | @@ -39,6 +39,8 @@ |
39 | 39 | supported yet. |
40 | 40 | */ |
41 | 41 | |
42 | +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | |
43 | + | |
42 | 44 | #include <linux/module.h> |
43 | 45 | #include <linux/init.h> |
44 | 46 | #include <linux/slab.h> |
45 | 47 | |
... | ... | @@ -1166,14 +1168,13 @@ |
1166 | 1168 | superio_inb(sio_data, WINB_BASE_REG + 1); |
1167 | 1169 | *addr = val & WINB_ALIGNMENT; |
1168 | 1170 | if (*addr == 0) { |
1169 | - printk(KERN_WARNING DRVNAME ": Base address not set, " | |
1170 | - "skipping\n"); | |
1171 | + pr_warn("Base address not set, skipping\n"); | |
1171 | 1172 | goto exit; |
1172 | 1173 | } |
1173 | 1174 | |
1174 | 1175 | val = superio_inb(sio_data, WINB_ACT_REG); |
1175 | 1176 | if (!(val & 0x01)) { |
1176 | - printk(KERN_WARNING DRVNAME ": Enabling HWM logical device\n"); | |
1177 | + pr_warn("Enabling HWM logical device\n"); | |
1177 | 1178 | superio_outb(sio_data, WINB_ACT_REG, val | 0x01); |
1178 | 1179 | } |
1179 | 1180 | |
1180 | 1181 | |
1181 | 1182 | |
1182 | 1183 | |
... | ... | @@ -1789,28 +1790,26 @@ |
1789 | 1790 | pdev = platform_device_alloc(DRVNAME, address); |
1790 | 1791 | if (!pdev) { |
1791 | 1792 | err = -ENOMEM; |
1792 | - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); | |
1793 | + pr_err("Device allocation failed\n"); | |
1793 | 1794 | goto exit; |
1794 | 1795 | } |
1795 | 1796 | |
1796 | 1797 | err = platform_device_add_resources(pdev, &res, 1); |
1797 | 1798 | if (err) { |
1798 | - printk(KERN_ERR DRVNAME ": Device resource addition failed " | |
1799 | - "(%d)\n", err); | |
1799 | + pr_err("Device resource addition failed (%d)\n", err); | |
1800 | 1800 | goto exit_device_put; |
1801 | 1801 | } |
1802 | 1802 | |
1803 | 1803 | err = platform_device_add_data(pdev, sio_data, |
1804 | 1804 | sizeof(struct w83627hf_sio_data)); |
1805 | 1805 | if (err) { |
1806 | - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); | |
1806 | + pr_err("Platform data allocation failed\n"); | |
1807 | 1807 | goto exit_device_put; |
1808 | 1808 | } |
1809 | 1809 | |
1810 | 1810 | err = platform_device_add(pdev); |
1811 | 1811 | if (err) { |
1812 | - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", | |
1813 | - err); | |
1812 | + pr_err("Device addition failed (%d)\n", err); | |
1814 | 1813 | goto exit_device_put; |
1815 | 1814 | } |
1816 | 1815 |