Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227761
b: refs/heads/master
c: 18de030
h: refs/heads/master
i:
  227759: 054a057
v: v3
  • Loading branch information
Joe Perches authored and Guenter Roeck committed Jan 8, 2011
1 parent dd5b726 commit 2da19df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: abdc6fd189405a83ebd20aa9facfbdf3c179d48a
refs/heads/master: 18de030f1dbaef0c13cf393899a298d978aa200f
17 changes: 8 additions & 9 deletions trunk/drivers/hwmon/w83627hf.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
supported yet.
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
Expand Down Expand Up @@ -1166,14 +1168,13 @@ static int __init w83627hf_find(int sioaddr, unsigned short *addr,
superio_inb(sio_data, WINB_BASE_REG + 1);
*addr = val & WINB_ALIGNMENT;
if (*addr == 0) {
printk(KERN_WARNING DRVNAME ": Base address not set, "
"skipping\n");
pr_warn("Base address not set, skipping\n");
goto exit;
}

val = superio_inb(sio_data, WINB_ACT_REG);
if (!(val & 0x01)) {
printk(KERN_WARNING DRVNAME ": Enabling HWM logical device\n");
pr_warn("Enabling HWM logical device\n");
superio_outb(sio_data, WINB_ACT_REG, val | 0x01);
}

Expand Down Expand Up @@ -1789,28 +1790,26 @@ static int __init w83627hf_device_add(unsigned short address,
pdev = platform_device_alloc(DRVNAME, address);
if (!pdev) {
err = -ENOMEM;
printk(KERN_ERR DRVNAME ": Device allocation failed\n");
pr_err("Device allocation failed\n");
goto exit;
}

err = platform_device_add_resources(pdev, &res, 1);
if (err) {
printk(KERN_ERR DRVNAME ": Device resource addition failed "
"(%d)\n", err);
pr_err("Device resource addition failed (%d)\n", err);
goto exit_device_put;
}

err = platform_device_add_data(pdev, sio_data,
sizeof(struct w83627hf_sio_data));
if (err) {
printk(KERN_ERR DRVNAME ": Platform data allocation failed\n");
pr_err("Platform data allocation failed\n");
goto exit_device_put;
}

err = platform_device_add(pdev);
if (err) {
printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n",
err);
pr_err("Device addition failed (%d)\n", err);
goto exit_device_put;
}

Expand Down

0 comments on commit 2da19df

Please sign in to comment.