summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/ngene/ngene-i2c.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-08-10 21:09:13 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-10 21:09:13 +0200
commit2f7043a37708110aa98262b91702da6bc32e17b6 (patch)
treede0525dae8420a56f9a00def631ccc0108d9d091 /drivers/media/pci/ngene/ngene-i2c.c
parentsparc64: Revert 16GB huge page support. (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff)
downloadlinux-2f7043a37708110aa98262b91702da6bc32e17b6.tar.xz
linux-2f7043a37708110aa98262b91702da6bc32e17b6.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Diffstat (limited to 'drivers/media/pci/ngene/ngene-i2c.c')
-rw-r--r--drivers/media/pci/ngene/ngene-i2c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/pci/ngene/ngene-i2c.c b/drivers/media/pci/ngene/ngene-i2c.c
index cf39fcf54adf..fbf36353c701 100644
--- a/drivers/media/pci/ngene/ngene-i2c.c
+++ b/drivers/media/pci/ngene/ngene-i2c.c
@@ -118,7 +118,7 @@ static int ngene_i2c_master_xfer(struct i2c_adapter *adapter,
(struct ngene_channel *)i2c_get_adapdata(adapter);
struct ngene *dev = chan->dev;
- down(&dev->i2c_switch_mutex);
+ mutex_lock(&dev->i2c_switch_mutex);
ngene_i2c_set_bus(dev, chan->number);
if (num == 2 && msg[1].flags & I2C_M_RD && !(msg[0].flags & I2C_M_RD))
@@ -136,11 +136,11 @@ static int ngene_i2c_master_xfer(struct i2c_adapter *adapter,
msg[0].buf, msg[0].len, 0))
goto done;
- up(&dev->i2c_switch_mutex);
+ mutex_unlock(&dev->i2c_switch_mutex);
return -EIO;
done:
- up(&dev->i2c_switch_mutex);
+ mutex_unlock(&dev->i2c_switch_mutex);
return num;
}