diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2013-11-14 17:32:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-14 19:32:21 -0500 |
commit | 16735d022f72b20ddbb2274b8e109f69575e9b2b (patch) | |
tree | f567c7dfff06ae18899feab7cd8a79a7a0f7be40 /drivers/iio | |
parent | c32f74ab2872994bc8336ed367313da3139350ca (diff) |
tree-wide: use reinit_completion instead of INIT_COMPLETION
Use this new function to make code more comprehensible, since we are
reinitialzing the completion, not initializing.
[akpm@linux-foundation.org: linux-next resyncs]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/ad_sigma_delta.c | 6 | ||||
-rw-r--r-- | drivers/iio/adc/nau7802.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c index e6fbd3e70981..9a4e0e32a771 100644 --- a/drivers/iio/adc/ad_sigma_delta.c +++ b/drivers/iio/adc/ad_sigma_delta.c | |||
@@ -188,7 +188,7 @@ static int ad_sd_calibrate(struct ad_sigma_delta *sigma_delta, | |||
188 | 188 | ||
189 | spi_bus_lock(sigma_delta->spi->master); | 189 | spi_bus_lock(sigma_delta->spi->master); |
190 | sigma_delta->bus_locked = true; | 190 | sigma_delta->bus_locked = true; |
191 | INIT_COMPLETION(sigma_delta->completion); | 191 | reinit_completion(&sigma_delta->completion); |
192 | 192 | ||
193 | ret = ad_sigma_delta_set_mode(sigma_delta, mode); | 193 | ret = ad_sigma_delta_set_mode(sigma_delta, mode); |
194 | if (ret < 0) | 194 | if (ret < 0) |
@@ -259,7 +259,7 @@ int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev, | |||
259 | 259 | ||
260 | spi_bus_lock(sigma_delta->spi->master); | 260 | spi_bus_lock(sigma_delta->spi->master); |
261 | sigma_delta->bus_locked = true; | 261 | sigma_delta->bus_locked = true; |
262 | INIT_COMPLETION(sigma_delta->completion); | 262 | reinit_completion(&sigma_delta->completion); |
263 | 263 | ||
264 | ad_sigma_delta_set_mode(sigma_delta, AD_SD_MODE_SINGLE); | 264 | ad_sigma_delta_set_mode(sigma_delta, AD_SD_MODE_SINGLE); |
265 | 265 | ||
@@ -343,7 +343,7 @@ static int ad_sd_buffer_postdisable(struct iio_dev *indio_dev) | |||
343 | { | 343 | { |
344 | struct ad_sigma_delta *sigma_delta = iio_device_get_drvdata(indio_dev); | 344 | struct ad_sigma_delta *sigma_delta = iio_device_get_drvdata(indio_dev); |
345 | 345 | ||
346 | INIT_COMPLETION(sigma_delta->completion); | 346 | reinit_completion(&sigma_delta->completion); |
347 | wait_for_completion_timeout(&sigma_delta->completion, HZ); | 347 | wait_for_completion_timeout(&sigma_delta->completion, HZ); |
348 | 348 | ||
349 | if (!sigma_delta->irq_dis) { | 349 | if (!sigma_delta->irq_dis) { |
diff --git a/drivers/iio/adc/nau7802.c b/drivers/iio/adc/nau7802.c index 54c5babe6746..e525aa6475c4 100644 --- a/drivers/iio/adc/nau7802.c +++ b/drivers/iio/adc/nau7802.c | |||
@@ -190,7 +190,7 @@ static int nau7802_read_irq(struct iio_dev *indio_dev, | |||
190 | struct nau7802_state *st = iio_priv(indio_dev); | 190 | struct nau7802_state *st = iio_priv(indio_dev); |
191 | int ret; | 191 | int ret; |
192 | 192 | ||
193 | INIT_COMPLETION(st->value_ok); | 193 | reinit_completion(&st->value_ok); |
194 | enable_irq(st->client->irq); | 194 | enable_irq(st->client->irq); |
195 | 195 | ||
196 | nau7802_sync(st); | 196 | nau7802_sync(st); |