summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/iio/dds/ad9832.c2
-rw-r--r--drivers/staging/iio/dds/ad9852.c11
-rw-r--r--drivers/staging/iio/dds/ad9910.c26
-rw-r--r--drivers/staging/iio/dds/ad9951.c5
4 files changed, 7 insertions, 37 deletions
diff --git a/drivers/staging/iio/dds/ad9832.c b/drivers/staging/iio/dds/ad9832.c
index a4bb0482ed5b..e911893b3db0 100644
--- a/drivers/staging/iio/dds/ad9832.c
+++ b/drivers/staging/iio/dds/ad9832.c
@@ -166,8 +166,6 @@ static void ad9832_init(struct ad9832_state *st)
config = 0x3 << 14;
- mutex_lock(&st->lock);
-
xfer.len = 2;
xfer.tx_buf = &config;
diff --git a/drivers/staging/iio/dds/ad9852.c b/drivers/staging/iio/dds/ad9852.c
index 0a41d25583af..594fb6a94331 100644
--- a/drivers/staging/iio/dds/ad9852.c
+++ b/drivers/staging/iio/dds/ad9852.c
@@ -86,7 +86,6 @@ static ssize_t ad9852_set_parameter(struct device *dev,
xfer.len = 3;
xfer.tx_buf = &config->phajst1[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -96,7 +95,6 @@ static ssize_t ad9852_set_parameter(struct device *dev,
xfer.len = 6;
xfer.tx_buf = &config->fretun1[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -106,7 +104,6 @@ static ssize_t ad9852_set_parameter(struct device *dev,
xfer.len = 6;
xfer.tx_buf = &config->fretun2[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -116,7 +113,6 @@ static ssize_t ad9852_set_parameter(struct device *dev,
xfer.len = 6;
xfer.tx_buf = &config->dltafre[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -126,7 +122,6 @@ static ssize_t ad9852_set_parameter(struct device *dev,
xfer.len = 5;
xfer.tx_buf = &config->updtclk[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -136,7 +131,6 @@ static ssize_t ad9852_set_parameter(struct device *dev,
xfer.len = 4;
xfer.tx_buf = &config->ramprat[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -146,7 +140,6 @@ static ssize_t ad9852_set_parameter(struct device *dev,
xfer.len = 5;
xfer.tx_buf = &config->control[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -156,7 +149,6 @@ static ssize_t ad9852_set_parameter(struct device *dev,
xfer.len = 3;
xfer.tx_buf = &config->outpskm[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -166,16 +158,15 @@ static ssize_t ad9852_set_parameter(struct device *dev,
xfer.len = 2;
xfer.tx_buf = &config->outpskr[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
ret = spi_sync(st->sdev, &msg);
if (ret)
goto error_ret;
+
xfer.len = 3;
xfer.tx_buf = &config->daccntl[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
diff --git a/drivers/staging/iio/dds/ad9910.c b/drivers/staging/iio/dds/ad9910.c
index c59b40794768..e8fb75cb66ec 100644
--- a/drivers/staging/iio/dds/ad9910.c
+++ b/drivers/staging/iio/dds/ad9910.c
@@ -138,7 +138,6 @@ static ssize_t ad9910_set_parameter(struct device *dev,
xfer.len = 5;
xfer.tx_buf = &config->ioupd[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -148,7 +147,6 @@ static ssize_t ad9910_set_parameter(struct device *dev,
xfer.len = 5;
xfer.tx_buf = &config->ftw[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -158,7 +156,6 @@ static ssize_t ad9910_set_parameter(struct device *dev,
xfer.len = 3;
xfer.tx_buf = &config->pow[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -168,7 +165,6 @@ static ssize_t ad9910_set_parameter(struct device *dev,
xfer.len = 5;
xfer.tx_buf = &config->asf[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -178,7 +174,6 @@ static ssize_t ad9910_set_parameter(struct device *dev,
xfer.len = 5;
xfer.tx_buf = &config->multc[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -188,7 +183,6 @@ static ssize_t ad9910_set_parameter(struct device *dev,
xfer.len = 9;
xfer.tx_buf = &config->dig_rampl[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -198,7 +192,6 @@ static ssize_t ad9910_set_parameter(struct device *dev,
xfer.len = 9;
xfer.tx_buf = &config->dig_ramps[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -208,7 +201,6 @@ static ssize_t ad9910_set_parameter(struct device *dev,
xfer.len = 5;
xfer.tx_buf = &config->dig_rampr[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -218,25 +210,24 @@ static ssize_t ad9910_set_parameter(struct device *dev,
xfer.len = 9;
xfer.tx_buf = &config->sin_tonep0[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
ret = spi_sync(st->sdev, &msg);
if (ret)
goto error_ret;
+
xfer.len = 9;
xfer.tx_buf = &config->sin_tonep1[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
ret = spi_sync(st->sdev, &msg);
if (ret)
goto error_ret;
+
xfer.len = 9;
xfer.tx_buf = &config->sin_tonep2[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -245,43 +236,42 @@ static ssize_t ad9910_set_parameter(struct device *dev,
goto error_ret;
xfer.len = 9;
xfer.tx_buf = &config->sin_tonep3[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
ret = spi_sync(st->sdev, &msg);
if (ret)
goto error_ret;
+
xfer.len = 9;
xfer.tx_buf = &config->sin_tonep4[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
ret = spi_sync(st->sdev, &msg);
if (ret)
goto error_ret;
+
xfer.len = 9;
xfer.tx_buf = &config->sin_tonep5[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
ret = spi_sync(st->sdev, &msg);
if (ret)
goto error_ret;
+
xfer.len = 9;
xfer.tx_buf = &config->sin_tonep6[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
ret = spi_sync(st->sdev, &msg);
if (ret)
goto error_ret;
+
xfer.len = 9;
xfer.tx_buf = &config->sin_tonep7[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -326,8 +316,6 @@ static void ad9910_init(struct ad9910_state *st)
cfr[3] = TX_ENA | PDCLK_INV | PDCLK_ENB;
cfr[4] = PARA_ENA;
- mutex_lock(&st->lock);
-
xfer.len = 5;
xfer.tx_buf = &cfr;
@@ -343,8 +331,6 @@ static void ad9910_init(struct ad9910_state *st)
cfr[3] = REFCLK_RST | REFCLK_BYP;
cfr[4] = 0;
- mutex_lock(&st->lock);
-
xfer.len = 5;
xfer.tx_buf = &cfr;
diff --git a/drivers/staging/iio/dds/ad9951.c b/drivers/staging/iio/dds/ad9951.c
index bc3befff167a..57eddf6d4713 100644
--- a/drivers/staging/iio/dds/ad9951.c
+++ b/drivers/staging/iio/dds/ad9951.c
@@ -79,7 +79,6 @@ static ssize_t ad9951_set_parameter(struct device *dev,
xfer.len = 2;
xfer.tx_buf = &config->arr[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -89,7 +88,6 @@ static ssize_t ad9951_set_parameter(struct device *dev,
xfer.len = 5;
xfer.tx_buf = &config->ftw0[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -99,7 +97,6 @@ static ssize_t ad9951_set_parameter(struct device *dev,
xfer.len = 3;
xfer.tx_buf = &config->ftw1[0];
- mutex_lock(&st->lock);
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -143,8 +140,6 @@ static void ad9951_init(struct ad9951_state *st)
cfr[2] = HSPD_SYNC;
cfr[3] = 0;
- mutex_lock(&st->lock);
-
xfer.len = 4;
xfer.tx_buf = &cfr;