git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
drivers
/
i2c
/
busses
/
i2c-ali15x3.c
diff --git
a/drivers/i2c/busses/i2c-ali15x3.c
b/drivers/i2c/busses/i2c-ali15x3.c
index
446606c
..
4e3dfd7
100644
(file)
--- a/
drivers/i2c/busses/i2c-ali15x3.c
+++ b/
drivers/i2c/busses/i2c-ali15x3.c
@@
-67,6
+67,7
@@
#include <linux/stddef.h>
#include <linux/sched.h>
#include <linux/ioport.h>
#include <linux/stddef.h>
#include <linux/sched.h>
#include <linux/ioport.h>
+#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <asm/io.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <asm/io.h>
@@
-125,8
+126,8
@@
/* If force_addr is set to anything different from 0, we forcibly enable
the device at the given address. */
/* If force_addr is set to anything different from 0, we forcibly enable
the device at the given address. */
-static
int
force_addr = 0;
-
MODULE_PARM(force_addr, "i"
);
+static
u16
force_addr = 0;
+
module_param(force_addr, ushort, 0
);
MODULE_PARM_DESC(force_addr,
"Initialize the base address of the i2c controller");
MODULE_PARM_DESC(force_addr,
"Initialize the base address of the i2c controller");
@@
-296,7
+297,7
@@
static int ali15x3_transaction(struct i2c_adapter *adap)
/* We will always wait for a fraction of a second! */
timeout = 0;
do {
/* We will always wait for a fraction of a second! */
timeout = 0;
do {
-
i2c_delay
(1);
+
msleep
(1);
temp = inb_p(SMBHSTSTS);
} while ((!(temp & (ALI15X3_STS_ERR | ALI15X3_STS_DONE)))
&& (timeout++ < MAX_TIMEOUT));
temp = inb_p(SMBHSTSTS);
} while ((!(temp & (ALI15X3_STS_ERR | ALI15X3_STS_DONE)))
&& (timeout++ < MAX_TIMEOUT));
@@
-353,7
+354,7
@@
static s32 ali15x3_access(struct i2c_adapter * adap, u16 addr,
for (timeout = 0;
(timeout < MAX_TIMEOUT) && !(temp & ALI15X3_STS_IDLE);
timeout++) {
for (timeout = 0;
(timeout < MAX_TIMEOUT) && !(temp & ALI15X3_STS_IDLE);
timeout++) {
-
i2c_delay
(1);
+
msleep
(1);
temp = inb_p(SMBHSTSTS);
}
if (timeout >= MAX_TIMEOUT) {
temp = inb_p(SMBHSTSTS);
}
if (timeout >= MAX_TIMEOUT) {
@@
-470,7
+471,7
@@
static struct i2c_algorithm smbus_algorithm = {
static struct i2c_adapter ali15x3_adapter = {
.owner = THIS_MODULE,
static struct i2c_adapter ali15x3_adapter = {
.owner = THIS_MODULE,
- .class = I2C_
ADAP_CLASS_SMBUS
,
+ .class = I2C_
CLASS_HWMON
,
.algo = &smbus_algorithm,
.name = "unset",
};
.algo = &smbus_algorithm,
.name = "unset",
};
@@
-508,7
+509,7
@@
static void __devexit ali15x3_remove(struct pci_dev *dev)
}
static struct pci_driver ali15x3_driver = {
}
static struct pci_driver ali15x3_driver = {
- .name = "ali15x3
smbus",
+ .name = "ali15x3
_
smbus",
.id_table = ali15x3_ids,
.probe = ali15x3_probe,
.remove = __devexit_p(ali15x3_remove),
.id_table = ali15x3_ids,
.probe = ali15x3_probe,
.remove = __devexit_p(ali15x3_remove),