aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/w83627hf.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/w83627hf.c')
-rw-r--r--drivers/hwmon/w83627hf.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c
index 38e280523071..bde50e34d013 100644
--- a/drivers/hwmon/w83627hf.c
+++ b/drivers/hwmon/w83627hf.c
@@ -39,6 +39,8 @@
39 supported yet. 39 supported yet.
40*/ 40*/
41 41
42#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
43
42#include <linux/module.h> 44#include <linux/module.h>
43#include <linux/init.h> 45#include <linux/init.h>
44#include <linux/slab.h> 46#include <linux/slab.h>
@@ -1166,14 +1168,13 @@ static int __init w83627hf_find(int sioaddr, unsigned short *addr,
1166 superio_inb(sio_data, WINB_BASE_REG + 1); 1168 superio_inb(sio_data, WINB_BASE_REG + 1);
1167 *addr = val & WINB_ALIGNMENT; 1169 *addr = val & WINB_ALIGNMENT;
1168 if (*addr == 0) { 1170 if (*addr == 0) {
1169 printk(KERN_WARNING DRVNAME ": Base address not set, " 1171 pr_warn("Base address not set, skipping\n");
1170 "skipping\n");
1171 goto exit; 1172 goto exit;
1172 } 1173 }
1173 1174
1174 val = superio_inb(sio_data, WINB_ACT_REG); 1175 val = superio_inb(sio_data, WINB_ACT_REG);
1175 if (!(val & 0x01)) { 1176 if (!(val & 0x01)) {
1176 printk(KERN_WARNING DRVNAME ": Enabling HWM logical device\n"); 1177 pr_warn("Enabling HWM logical device\n");
1177 superio_outb(sio_data, WINB_ACT_REG, val | 0x01); 1178 superio_outb(sio_data, WINB_ACT_REG, val | 0x01);
1178 } 1179 }
1179 1180
@@ -1789,28 +1790,26 @@ static int __init w83627hf_device_add(unsigned short address,
1789 pdev = platform_device_alloc(DRVNAME, address); 1790 pdev = platform_device_alloc(DRVNAME, address);
1790 if (!pdev) { 1791 if (!pdev) {
1791 err = -ENOMEM; 1792 err = -ENOMEM;
1792 printk(KERN_ERR DRVNAME ": Device allocation failed\n"); 1793 pr_err("Device allocation failed\n");
1793 goto exit; 1794 goto exit;
1794 } 1795 }
1795 1796
1796 err = platform_device_add_resources(pdev, &res, 1); 1797 err = platform_device_add_resources(pdev, &res, 1);
1797 if (err) { 1798 if (err) {
1798 printk(KERN_ERR DRVNAME ": Device resource addition failed " 1799 pr_err("Device resource addition failed (%d)\n", err);
1799 "(%d)\n", err);
1800 goto exit_device_put; 1800 goto exit_device_put;
1801 } 1801 }
1802 1802
1803 err = platform_device_add_data(pdev, sio_data, 1803 err = platform_device_add_data(pdev, sio_data,
1804 sizeof(struct w83627hf_sio_data)); 1804 sizeof(struct w83627hf_sio_data));
1805 if (err) { 1805 if (err) {
1806 printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); 1806 pr_err("Platform data allocation failed\n");
1807 goto exit_device_put; 1807 goto exit_device_put;
1808 } 1808 }
1809 1809
1810 err = platform_device_add(pdev); 1810 err = platform_device_add(pdev);
1811 if (err) { 1811 if (err) {
1812 printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", 1812 pr_err("Device addition failed (%d)\n", err);
1813 err);
1814 goto exit_device_put; 1813 goto exit_device_put;
1815 } 1814 }
1816 1815