projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lis3lv02d: support both one- and two-byte sensors
[linux-2.6-block.git]
/
drivers
/
hwmon
/
f71805f.c
diff --git
a/drivers/hwmon/f71805f.c
b/drivers/hwmon/f71805f.c
index 5d9d5cc816a24d1a2e871deb5da53bf59d950f3d..89987657925361fa108a762993286ac2ba6a8788 100644
(file)
--- a/
drivers/hwmon/f71805f.c
+++ b/
drivers/hwmon/f71805f.c
@@
-39,8
+39,13
@@
#include <linux/mutex.h>
#include <linux/sysfs.h>
#include <linux/ioport.h>
#include <linux/mutex.h>
#include <linux/sysfs.h>
#include <linux/ioport.h>
+#include <linux/acpi.h>
#include <asm/io.h>
#include <asm/io.h>
+static unsigned short force_id;
+module_param(force_id, ushort, 0);
+MODULE_PARM_DESC(force_id, "Override the detected device ID");
+
static struct platform_device *pdev;
#define DRVNAME "f71805f"
static struct platform_device *pdev;
#define DRVNAME "f71805f"
@@
-1451,6
+1456,10
@@
static int __init f71805f_device_add(unsigned short address,
}
res.name = pdev->name;
}
res.name = pdev->name;
+ err = acpi_check_resource_conflict(&res);
+ if (err)
+ goto exit_device_put;
+
err = platform_device_add_resources(pdev, &res, 1);
if (err) {
printk(KERN_ERR DRVNAME ": Device resource addition failed "
err = platform_device_add_resources(pdev, &res, 1);
if (err) {
printk(KERN_ERR DRVNAME ": Device resource addition failed "
@@
-1497,7
+1506,7
@@
static int __init f71805f_find(int sioaddr, unsigned short *address,
if (devid != SIO_FINTEK_ID)
goto exit;
if (devid != SIO_FINTEK_ID)
goto exit;
- devid = superio_inw(sioaddr, SIO_REG_DEVID);
+ devid =
force_id ? force_id :
superio_inw(sioaddr, SIO_REG_DEVID);
switch (devid) {
case SIO_F71805F_ID:
sio_data->kind = f71805f;
switch (devid) {
case SIO_F71805F_ID:
sio_data->kind = f71805f;