mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-21 19:51:45 +00:00
Remove owner from i2c_adapter, restore inc_use and dec_use
instead. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2772 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
f7d00ae81d
commit
a223ec0fd5
20 files changed
+321
-31
No files matched your search
@@ -294,6 +294,19 @@ u32 nforce2_func(struct i2c_adapter *adapter)
|
||||
I2C_FUNC_SMBUS_BLOCK_DATA */;
|
||||
}
|
||||
|
||||
static void nforce2_inc(struct i2c_adapter *adapter)
|
||||
{
|
||||
#ifdef MODULE
|
||||
MOD_INC_USE_COUNT;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void nforce2_dec(struct i2c_adapter *adapter)
|
||||
{
|
||||
#ifdef MODULE
|
||||
MOD_DEC_USE_COUNT;
|
||||
#endif
|
||||
}
|
||||
|
||||
static struct pci_device_id nforce2_ids[] = {
|
||||
{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS,
|
||||
@@ -322,16 +335,12 @@ static int __devinit nforce2_probe_smb (struct pci_dev *dev, int reg, struct nfo
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* TODO: find a better way to find out whether this file is compiled
|
||||
* with i2c 2.7.0 of earlier
|
||||
*/
|
||||
#ifdef I2C_HW_SMBUS_AMD8111
|
||||
smbus->adapter.owner = THIS_MODULE;
|
||||
#endif
|
||||
sprintf(smbus->adapter.name, "SMBus nForce2 adapter at %04x", smbus->base);
|
||||
smbus->adapter.id = I2C_ALGO_SMBUS | I2C_HW_SMBUS_NFORCE2;
|
||||
smbus->adapter.algo = &smbus_algorithm;
|
||||
smbus->adapter.algo_data = smbus;
|
||||
smbus->adapter.inc_use = nforce2_inc;
|
||||
smbus->adapter.dec_use = nforce2_dec;
|
||||
|
||||
error = i2c_add_adapter(&smbus->adapter);
|
||||
if (error) {
|
||||
|
||||
Reference in new issue
Block a user