projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hwmon: Let the user override the detected Super-I/O device ID
[powerpc.git]
/
drivers
/
hwmon
/
pc87427.c
diff --git
a/drivers/hwmon/pc87427.c
b/drivers/hwmon/pc87427.c
index
d40509a
..
7265f22
100644
(file)
--- a/
drivers/hwmon/pc87427.c
+++ b/
drivers/hwmon/pc87427.c
@@
-34,6
+34,10
@@
#include <linux/ioport.h>
#include <asm/io.h>
#include <linux/ioport.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 "pc87427"
static struct platform_device *pdev;
#define DRVNAME "pc87427"
@@
-555,7
+559,7
@@
static int __init pc87427_find(int sioaddr, unsigned short *address)
int i, err = 0;
/* Identify device */
int i, err = 0;
/* Identify device */
- val = superio_inb(sioaddr, SIOREG_DEVID);
+ val =
force_id ? force_id :
superio_inb(sioaddr, SIOREG_DEVID);
if (val != 0xf2) { /* PC87427 */
err = -ENODEV;
goto exit;
if (val != 0xf2) { /* PC87427 */
err = -ENODEV;
goto exit;