X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fi2c%2Fbusses%2Fi2c-sis630.c;h=dec0bafb52ab5cd5f241b7675800048a790c7cd8;hb=refs%2Fheads%2Fvserver;hp=20e3fb42b53f36b67b6ff751c970c32a64da29b8;hpb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;p=linux-2.6.git diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c index 20e3fb42b..dec0bafb5 100644 --- a/drivers/i2c/busses/i2c-sis630.c +++ b/drivers/i2c/busses/i2c-sis630.c @@ -48,7 +48,6 @@ Note: we assume there can only be one device, with one SMBus interface. */ -#include #include #include #include @@ -93,6 +92,8 @@ #define SIS630_PCALL 0x04 #define SIS630_BLOCK_DATA 0x05 +static struct pci_driver sis630_driver; + /* insmod parameters */ static int high_clock; static int force; @@ -102,7 +103,7 @@ module_param(force, bool, 0); MODULE_PARM_DESC(force, "Forcibly enable the SIS630. DANGEROUS!"); /* acpi base address */ -static unsigned short acpi_base = 0; +static unsigned short acpi_base; /* supported chips */ static int supported[] = { @@ -433,7 +434,8 @@ static int sis630_setup(struct pci_dev *sis630_dev) dev_dbg(&sis630_dev->dev, "ACPI base at 0x%04x\n", acpi_base); /* Everything is happy, let's grab the memory and set things up. */ - if (!request_region(acpi_base + SMB_STS, SIS630_SMB_IOREGION, "sis630-smbus")) { + if (!request_region(acpi_base + SMB_STS, SIS630_SMB_IOREGION, + sis630_driver.name)) { dev_err(&sis630_dev->dev, "SMBus registers 0x%04x-0x%04x already " "in use!\n", acpi_base + SMB_STS, acpi_base + SMB_SAA); goto exit; @@ -448,9 +450,7 @@ exit: } -static struct i2c_algorithm smbus_algorithm = { - .name = "Non-I2C SMBus adapter", - .id = I2C_ALGO_SMBUS, +static const struct i2c_algorithm smbus_algorithm = { .smbus_xfer = sis630_access, .functionality = sis630_func, }; @@ -458,7 +458,6 @@ static struct i2c_algorithm smbus_algorithm = { static struct i2c_adapter sis630_adapter = { .owner = THIS_MODULE, .class = I2C_CLASS_HWMON, - .name = "unset", .algo = &smbus_algorithm, }; @@ -468,6 +467,8 @@ static struct pci_device_id sis630_ids[] __devinitdata = { { 0, } }; +MODULE_DEVICE_TABLE (pci, sis630_ids); + static int __devinit sis630_probe(struct pci_dev *dev, const struct pci_device_id *id) { if (sis630_setup(dev)) { @@ -503,7 +504,7 @@ static struct pci_driver sis630_driver = { static int __init i2c_sis630_init(void) { - return pci_module_init(&sis630_driver); + return pci_register_driver(&sis630_driver); }