]>
Commit | Line | Data |
---|---|---|
33afafb0 JR |
1 | Author: Andreas Beckmann <anbe@debian.org> |
2 | Bug-Debian: http://bugs.debian.org/717361 | |
3 | Description: adjust for kernel 3.10 i2c interface changes | |
4 | backported from 304.108 | |
5 | ||
6 | diff --git a/kernel/nv-i2c.c b/kernel/nv-i2c.c | |
7 | index a702506..2aa0b77 100644 | |
8 | --- a/kernel/nv-i2c.c | |
9 | +++ b/kernel/nv-i2c.c | |
10 | @@ -311,8 +311,6 @@ void* NV_API_CALL nv_i2c_add_adapter(nv_state_t *nv, NvU32 port) | |
11 | BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data) | |
12 | { | |
13 | struct i2c_adapter *pI2cAdapter = (struct i2c_adapter *)data; | |
14 | - int osstatus = 0; | |
15 | - BOOL wasReleased = FALSE; | |
16 | ||
17 | #if defined(KERNEL_2_4) | |
18 | if (!NV_WEAK_SYMBOL_PRESENT(i2c_add_adapter)) | |
19 | @@ -323,16 +321,11 @@ BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data) | |
20 | ||
21 | if (!pI2cAdapter) return FALSE; | |
22 | ||
23 | - // attempt release with the OS | |
24 | - osstatus = i2c_del_adapter(pI2cAdapter); | |
25 | - | |
26 | - if (!osstatus) | |
27 | - { | |
28 | - os_free_mem(pI2cAdapter); | |
29 | - wasReleased = TRUE; | |
30 | - } | |
31 | + // release with the OS | |
32 | + i2c_del_adapter(pI2cAdapter); | |
33 | + os_free_mem(pI2cAdapter); | |
34 | ||
35 | - return wasReleased; | |
36 | + return TRUE; | |
37 | } | |
38 | ||
39 | #else // (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)) |