diff options
Diffstat (limited to 'drivers/media/dvb/b2c2/flexcop-i2c.c')
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-i2c.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-i2c.c b/drivers/media/dvb/b2c2/flexcop-i2c.c index 56495cb6cd02..e0bd2d8f0f0c 100644 --- a/drivers/media/dvb/b2c2/flexcop-i2c.c +++ b/drivers/media/dvb/b2c2/flexcop-i2c.c | |||
@@ -135,7 +135,7 @@ static int flexcop_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs | |||
135 | struct flexcop_device *fc = i2c_get_adapdata(i2c_adap); | 135 | struct flexcop_device *fc = i2c_get_adapdata(i2c_adap); |
136 | int i, ret = 0; | 136 | int i, ret = 0; |
137 | 137 | ||
138 | if (down_interruptible(&fc->i2c_sem)) | 138 | if (mutex_lock_interruptible(&fc->i2c_mutex)) |
139 | return -ERESTARTSYS; | 139 | return -ERESTARTSYS; |
140 | 140 | ||
141 | /* reading */ | 141 | /* reading */ |
@@ -161,7 +161,7 @@ static int flexcop_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs | |||
161 | else | 161 | else |
162 | ret = num; | 162 | ret = num; |
163 | 163 | ||
164 | up(&fc->i2c_sem); | 164 | mutex_unlock(&fc->i2c_mutex); |
165 | 165 | ||
166 | return ret; | 166 | return ret; |
167 | } | 167 | } |
@@ -180,7 +180,7 @@ int flexcop_i2c_init(struct flexcop_device *fc) | |||
180 | { | 180 | { |
181 | int ret; | 181 | int ret; |
182 | 182 | ||
183 | sema_init(&fc->i2c_sem,1); | 183 | mutex_init(&fc->i2c_mutex); |
184 | 184 | ||
185 | memset(&fc->i2c_adap, 0, sizeof(struct i2c_adapter)); | 185 | memset(&fc->i2c_adap, 0, sizeof(struct i2c_adapter)); |
186 | strncpy(fc->i2c_adap.name, "B2C2 FlexCop device",I2C_NAME_SIZE); | 186 | strncpy(fc->i2c_adap.name, "B2C2 FlexCop device",I2C_NAME_SIZE); |