| | 325 | void i2c_inc_use_client(struct i2c_client *client) |
| | 326 | { |
| | 327 | struct i2c_adapter *adapter = client->adapter; |
| | 328 | struct i2c_algorithm *algo = adapter->algo; |
| | 329 | |
| | 330 | if (client->driver->inc_use != NULL) |
| | 331 | client->driver->inc_use(client); |
| | 332 | |
| | 333 | if (algo->inc_use != NULL) |
| | 334 | algo->inc_use(adapter); |
| | 335 | } |
| | 336 | |
| | 337 | void i2c_dec_use_client(struct i2c_client *client) |
| | 338 | { |
| | 339 | struct i2c_adapter *adapter = client->adapter; |
| | 340 | struct i2c_algorithm *algo = adapter->algo; |
| | 341 | |
| | 342 | if (client->driver->dec_use != NULL) |
| | 343 | client->driver->dec_use(client); |
| | 344 | |
| | 345 | if (algo->dec_use != NULL) |
| | 346 | algo->dec_use(adapter); |
| | 347 | } |