X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fi2c%2Fbusses%2Fi2c-viapro.c;h=396b5ebf117f6a43c217a588a9b2b8fe11a03ac6;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=c45b33f3802f6cf1c6f4fba3171052634b86095a;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c index c45b33f38..396b5ebf1 100644 --- a/drivers/i2c/busses/i2c-viapro.c +++ b/drivers/i2c/busses/i2c-viapro.c @@ -35,6 +35,7 @@ #include #include +#include #include #include #include @@ -91,13 +92,13 @@ static unsigned short smb_cf_hstcfg = 0xD2; /* 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!"); @@ -138,7 +139,7 @@ static int vt596_transaction(void) /* 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)); @@ -289,7 +290,7 @@ static struct i2c_algorithm smbus_algorithm = { static struct i2c_adapter vt596_adapter = { .owner = THIS_MODULE, - .class = I2C_ADAP_CLASS_SMBUS, + .class = I2C_CLASS_HWMON, .algo = &smbus_algorithm, .name = "unset", }; @@ -454,7 +455,7 @@ static struct pci_device_id vt596_ids[] = { }; static struct pci_driver vt596_driver = { - .name = "vt596 smbus", + .name = "vt596_smbus", .id_table = vt596_ids, .probe = vt596_probe, .remove = __devexit_p(vt596_remove),