mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-28 20:58:22 +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
@@ -324,6 +324,19 @@ s32 amd8111_access(struct i2c_adapter * adap, u16 addr, unsigned short flags,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void amd8111_inc(struct i2c_adapter *adapter)
|
||||
{
|
||||
#ifdef MODULE
|
||||
MOD_INC_USE_COUNT;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void amd8111_dec(struct i2c_adapter *adapter)
|
||||
{
|
||||
#ifdef MODULE
|
||||
MOD_DEC_USE_COUNT;
|
||||
#endif
|
||||
}
|
||||
|
||||
u32 amd8111_func(struct i2c_adapter *adapter)
|
||||
{
|
||||
@@ -368,11 +381,12 @@ static int __devinit amd8111_probe(struct pci_dev *dev, const struct pci_device_
|
||||
return -1;
|
||||
}
|
||||
|
||||
smbus->adapter.owner = THIS_MODULE;
|
||||
sprintf(smbus->adapter.name, "SMBus2 AMD8111 adapter at %04x", smbus->base);
|
||||
smbus->adapter.id = I2C_ALGO_SMBUS | I2C_HW_SMBUS_AMD8111;
|
||||
smbus->adapter.algo = &smbus_algorithm;
|
||||
smbus->adapter.algo_data = smbus;
|
||||
smbus->adapter.inc_use = amd8111_inc;
|
||||
smbus->adapter.dec_use = amd8111_dec;
|
||||
|
||||
error = i2c_add_adapter(&smbus->adapter);
|
||||
if (error) {
|
||||
|
||||
Reference in new issue
Block a user