#include <linux/config.h>
#include <linux/module.h>
+#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/stddef.h>
/* If force is set to anything different from 0, we forcibly enable the
VT596. DANGEROUS! */
static int force;
-MODULE_PARM(force, "i");
+module_param(force, bool, 0);
MODULE_PARM_DESC(force, "Forcibly enable the SMBus. DANGEROUS!");
/* If force_addr is set to anything different from 0, we forcibly enable
the VT596 at the given address. VERY DANGEROUS! */
-static int force_addr;
-MODULE_PARM(force_addr, "i");
+static u16 force_addr;
+module_param(force_addr, ushort, 0);
MODULE_PARM_DESC(force_addr,
"Forcibly enable the SMBus at the given address. "
"EXTREMELY DANGEROUS!");
/* We will always wait for a fraction of a second!
I don't know if VIA needs this, Intel did */
do {
- i2c_delay(1);
+ msleep(1);
temp = inb_p(SMBHSTSTS);
} while ((temp & 0x01) && (timeout++ < MAX_TIMEOUT));
static struct i2c_adapter vt596_adapter = {
.owner = THIS_MODULE,
- .class = I2C_ADAP_CLASS_SMBUS,
+ .class = I2C_CLASS_HWMON,
.algo = &smbus_algorithm,
.name = "unset",
};
};
static struct pci_driver vt596_driver = {
- .name = "vt596 smbus",
+ .name = "vt596_smbus",
.id_table = vt596_ids,
.probe = vt596_probe,
.remove = __devexit_p(vt596_remove),