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 | |
| 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')
75 files changed, 116 insertions, 116 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 77bbc8266883..92d7797223be 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
| @@ -3017,7 +3017,7 @@ static inline void ata_eh_pull_park_action(struct ata_port *ap) | |||
| 3017 | * ourselves at the beginning of each pass over the loop. | 3017 | * ourselves at the beginning of each pass over the loop. |
| 3018 | * | 3018 | * |
| 3019 | * Additionally, all write accesses to &ap->park_req_pending | 3019 | * Additionally, all write accesses to &ap->park_req_pending |
| 3020 | * through INIT_COMPLETION() (see below) or complete_all() | 3020 | * through reinit_completion() (see below) or complete_all() |
| 3021 | * (see ata_scsi_park_store()) are protected by the host lock. | 3021 | * (see ata_scsi_park_store()) are protected by the host lock. |
| 3022 | * As a result we have that park_req_pending.done is zero on | 3022 | * As a result we have that park_req_pending.done is zero on |
| 3023 | * exit from this function, i.e. when ATA_EH_PARK actions for | 3023 | * exit from this function, i.e. when ATA_EH_PARK actions for |
| @@ -3031,7 +3031,7 @@ static inline void ata_eh_pull_park_action(struct ata_port *ap) | |||
| 3031 | */ | 3031 | */ |
| 3032 | 3032 | ||
| 3033 | spin_lock_irqsave(ap->lock, flags); | 3033 | spin_lock_irqsave(ap->lock, flags); |
| 3034 | INIT_COMPLETION(ap->park_req_pending); | 3034 | reinit_completion(&ap->park_req_pending); |
| 3035 | ata_for_each_link(link, ap, EDGE) { | 3035 | ata_for_each_link(link, ap, EDGE) { |
| 3036 | ata_for_each_dev(dev, link, ALL) { | 3036 | ata_for_each_dev(dev, link, ALL) { |
| 3037 | struct ata_eh_info *ehi = &link->eh_info; | 3037 | struct ata_eh_info *ehi = &link->eh_info; |
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index ee039afe9078..c12e9b9556be 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
| @@ -757,7 +757,7 @@ void dpm_resume(pm_message_t state) | |||
| 757 | async_error = 0; | 757 | async_error = 0; |
| 758 | 758 | ||
| 759 | list_for_each_entry(dev, &dpm_suspended_list, power.entry) { | 759 | list_for_each_entry(dev, &dpm_suspended_list, power.entry) { |
| 760 | INIT_COMPLETION(dev->power.completion); | 760 | reinit_completion(&dev->power.completion); |
| 761 | if (is_async(dev)) { | 761 | if (is_async(dev)) { |
| 762 | get_device(dev); | 762 | get_device(dev); |
| 763 | async_schedule(async_resume, dev); | 763 | async_schedule(async_resume, dev); |
| @@ -1237,7 +1237,7 @@ static void async_suspend(void *data, async_cookie_t cookie) | |||
| 1237 | 1237 | ||
| 1238 | static int device_suspend(struct device *dev) | 1238 | static int device_suspend(struct device *dev) |
| 1239 | { | 1239 | { |
| 1240 | INIT_COMPLETION(dev->power.completion); | 1240 | reinit_completion(&dev->power.completion); |
| 1241 | 1241 | ||
| 1242 | if (pm_async_enabled && dev->power.async_suspend) { | 1242 | if (pm_async_enabled && dev->power.async_suspend) { |
| 1243 | get_device(dev); | 1243 | get_device(dev); |
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c index 4ff85b8785ee..748dea4f34dc 100644 --- a/drivers/block/amiflop.c +++ b/drivers/block/amiflop.c | |||
| @@ -343,7 +343,7 @@ static int fd_motor_on(int nr) | |||
| 343 | unit[nr].motor = 1; | 343 | unit[nr].motor = 1; |
| 344 | fd_select(nr); | 344 | fd_select(nr); |
| 345 | 345 | ||
| 346 | INIT_COMPLETION(motor_on_completion); | 346 | reinit_completion(&motor_on_completion); |
| 347 | motor_on_timer.data = nr; | 347 | motor_on_timer.data = nr; |
| 348 | mod_timer(&motor_on_timer, jiffies + HZ/2); | 348 | mod_timer(&motor_on_timer, jiffies + HZ/2); |
| 349 | 349 | ||
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 0c004ac05811..b35fc4f5237c 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
| @@ -2808,7 +2808,7 @@ resend_cmd2: | |||
| 2808 | /* erase the old error information */ | 2808 | /* erase the old error information */ |
| 2809 | memset(c->err_info, 0, sizeof(ErrorInfo_struct)); | 2809 | memset(c->err_info, 0, sizeof(ErrorInfo_struct)); |
| 2810 | return_status = IO_OK; | 2810 | return_status = IO_OK; |
| 2811 | INIT_COMPLETION(wait); | 2811 | reinit_completion(&wait); |
| 2812 | goto resend_cmd2; | 2812 | goto resend_cmd2; |
| 2813 | } | 2813 | } |
| 2814 | 2814 | ||
| @@ -3669,7 +3669,7 @@ static int add_to_scan_list(struct ctlr_info *h) | |||
| 3669 | } | 3669 | } |
| 3670 | } | 3670 | } |
| 3671 | if (!found && !h->busy_scanning) { | 3671 | if (!found && !h->busy_scanning) { |
| 3672 | INIT_COMPLETION(h->scan_wait); | 3672 | reinit_completion(&h->scan_wait); |
| 3673 | list_add_tail(&h->scan_list, &scan_q); | 3673 | list_add_tail(&h->scan_list, &scan_q); |
| 3674 | ret = 1; | 3674 | ret = 1; |
| 3675 | } | 3675 | } |
diff --git a/drivers/char/hw_random/timeriomem-rng.c b/drivers/char/hw_random/timeriomem-rng.c index d2120ba8f3f9..73ce739f8e19 100644 --- a/drivers/char/hw_random/timeriomem-rng.c +++ b/drivers/char/hw_random/timeriomem-rng.c | |||
| @@ -79,7 +79,7 @@ static int timeriomem_rng_data_read(struct hwrng *rng, u32 *data) | |||
| 79 | priv->expires = cur + delay; | 79 | priv->expires = cur + delay; |
| 80 | priv->present = 0; | 80 | priv->present = 0; |
| 81 | 81 | ||
| 82 | INIT_COMPLETION(priv->completion); | 82 | reinit_completion(&priv->completion); |
| 83 | mod_timer(&priv->timer, priv->expires); | 83 | mod_timer(&priv->timer, priv->expires); |
| 84 | 84 | ||
| 85 | return 4; | 85 | return 4; |
diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c index 2d58da972ae2..fa05e3c329bd 100644 --- a/drivers/crypto/tegra-aes.c +++ b/drivers/crypto/tegra-aes.c | |||
| @@ -268,7 +268,7 @@ static int aes_start_crypt(struct tegra_aes_dev *dd, u32 in_addr, u32 out_addr, | |||
| 268 | aes_writel(dd, value, TEGRA_AES_SECURE_INPUT_SELECT); | 268 | aes_writel(dd, value, TEGRA_AES_SECURE_INPUT_SELECT); |
| 269 | 269 | ||
| 270 | aes_writel(dd, out_addr, TEGRA_AES_SECURE_DEST_ADDR); | 270 | aes_writel(dd, out_addr, TEGRA_AES_SECURE_DEST_ADDR); |
| 271 | INIT_COMPLETION(dd->op_complete); | 271 | reinit_completion(&dd->op_complete); |
| 272 | 272 | ||
| 273 | for (i = 0; i < AES_HW_MAX_ICQ_LENGTH - 1; i++) { | 273 | for (i = 0; i < AES_HW_MAX_ICQ_LENGTH - 1; i++) { |
| 274 | do { | 274 | do { |
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c index e5af0e3a26ec..0e799516a2ab 100644 --- a/drivers/firewire/core-transaction.c +++ b/drivers/firewire/core-transaction.c | |||
| @@ -477,7 +477,7 @@ void fw_send_phy_config(struct fw_card *card, | |||
| 477 | phy_config_packet.header[1] = data; | 477 | phy_config_packet.header[1] = data; |
| 478 | phy_config_packet.header[2] = ~data; | 478 | phy_config_packet.header[2] = ~data; |
| 479 | phy_config_packet.generation = generation; | 479 | phy_config_packet.generation = generation; |
| 480 | INIT_COMPLETION(phy_config_done); | 480 | reinit_completion(&phy_config_done); |
| 481 | 481 | ||
| 482 | card->driver->send_request(card, &phy_config_packet); | 482 | card->driver->send_request(card, &phy_config_packet); |
| 483 | wait_for_completion_timeout(&phy_config_done, timeout); | 483 | wait_for_completion_timeout(&phy_config_done, timeout); |
diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c b/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c index 1eb86c79523e..e28107061148 100644 --- a/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c +++ b/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c | |||
| @@ -99,7 +99,7 @@ static int xfer_read(struct i2c_adapter *adap, struct i2c_msg *pmsg) | |||
| 99 | i2c_dev->status = I2C_STAT_INIT; | 99 | i2c_dev->status = I2C_STAT_INIT; |
| 100 | i2c_dev->msg = pmsg; | 100 | i2c_dev->msg = pmsg; |
| 101 | i2c_dev->buf_offset = 0; | 101 | i2c_dev->buf_offset = 0; |
| 102 | INIT_COMPLETION(i2c_dev->complete); | 102 | reinit_completion(&i2c_dev->complete); |
| 103 | 103 | ||
| 104 | /* Enable I2C transaction */ | 104 | /* Enable I2C transaction */ |
| 105 | temp = ((pmsg->len) << 20) | HI2C_EDID_READ | HI2C_ENABLE_TRANSACTION; | 105 | temp = ((pmsg->len) << 20) | HI2C_EDID_READ | HI2C_ENABLE_TRANSACTION; |
diff --git a/drivers/hid/hid-wiimote.h b/drivers/hid/hid-wiimote.h index 75db0c400037..cfa63b0825b0 100644 --- a/drivers/hid/hid-wiimote.h +++ b/drivers/hid/hid-wiimote.h | |||
| @@ -327,7 +327,7 @@ static inline void wiimote_cmd_acquire_noint(struct wiimote_data *wdata) | |||
| 327 | static inline void wiimote_cmd_set(struct wiimote_data *wdata, int cmd, | 327 | static inline void wiimote_cmd_set(struct wiimote_data *wdata, int cmd, |
| 328 | __u32 opt) | 328 | __u32 opt) |
| 329 | { | 329 | { |
| 330 | INIT_COMPLETION(wdata->state.ready); | 330 | reinit_completion(&wdata->state.ready); |
| 331 | wdata->state.cmd = cmd; | 331 | wdata->state.cmd = cmd; |
| 332 | wdata->state.opt = opt; | 332 | wdata->state.opt = opt; |
| 333 | } | 333 | } |
diff --git a/drivers/hwmon/jz4740-hwmon.c b/drivers/hwmon/jz4740-hwmon.c index e0d66b9590ab..a183e488db78 100644 --- a/drivers/hwmon/jz4740-hwmon.c +++ b/drivers/hwmon/jz4740-hwmon.c | |||
| @@ -66,7 +66,7 @@ static ssize_t jz4740_hwmon_read_adcin(struct device *dev, | |||
| 66 | 66 | ||
| 67 | mutex_lock(&hwmon->lock); | 67 | mutex_lock(&hwmon->lock); |
| 68 | 68 | ||
| 69 | INIT_COMPLETION(*completion); | 69 | reinit_completion(completion); |
| 70 | 70 | ||
| 71 | enable_irq(hwmon->irq); | 71 | enable_irq(hwmon->irq); |
| 72 | hwmon->cell->enable(to_platform_device(dev)); | 72 | hwmon->cell->enable(to_platform_device(dev)); |
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index fd059308affa..8edba9de76df 100644 --- a/drivers/i2c/busses/i2c-at91.c +++ b/drivers/i2c/busses/i2c-at91.c | |||
| @@ -371,7 +371,7 @@ static int at91_do_twi_transfer(struct at91_twi_dev *dev) | |||
| 371 | dev_dbg(dev->dev, "transfer: %s %d bytes.\n", | 371 | dev_dbg(dev->dev, "transfer: %s %d bytes.\n", |
| 372 | (dev->msg->flags & I2C_M_RD) ? "read" : "write", dev->buf_len); | 372 | (dev->msg->flags & I2C_M_RD) ? "read" : "write", dev->buf_len); |
| 373 | 373 | ||
| 374 | INIT_COMPLETION(dev->cmd_complete); | 374 | reinit_completion(&dev->cmd_complete); |
| 375 | dev->transfer_status = 0; | 375 | dev->transfer_status = 0; |
| 376 | 376 | ||
| 377 | if (!dev->buf_len) { | 377 | if (!dev->buf_len) { |
diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c index ea4b08fc3353..d7e8600f31fb 100644 --- a/drivers/i2c/busses/i2c-bcm2835.c +++ b/drivers/i2c/busses/i2c-bcm2835.c | |||
| @@ -151,7 +151,7 @@ static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, | |||
| 151 | 151 | ||
| 152 | i2c_dev->msg_buf = msg->buf; | 152 | i2c_dev->msg_buf = msg->buf; |
| 153 | i2c_dev->msg_buf_remaining = msg->len; | 153 | i2c_dev->msg_buf_remaining = msg->len; |
| 154 | INIT_COMPLETION(i2c_dev->completion); | 154 | reinit_completion(&i2c_dev->completion); |
| 155 | 155 | ||
| 156 | bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, BCM2835_I2C_C_CLEAR); | 156 | bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, BCM2835_I2C_C_CLEAR); |
| 157 | 157 | ||
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 132369fad4e0..960dec61c64e 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c | |||
| @@ -323,7 +323,7 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop) | |||
| 323 | 323 | ||
| 324 | davinci_i2c_write_reg(dev, DAVINCI_I2C_CNT_REG, dev->buf_len); | 324 | davinci_i2c_write_reg(dev, DAVINCI_I2C_CNT_REG, dev->buf_len); |
| 325 | 325 | ||
| 326 | INIT_COMPLETION(dev->cmd_complete); | 326 | reinit_completion(&dev->cmd_complete); |
| 327 | dev->cmd_err = 0; | 327 | dev->cmd_err = 0; |
| 328 | 328 | ||
| 329 | /* Take I2C out of reset and configure it as master */ | 329 | /* Take I2C out of reset and configure it as master */ |
diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c index 5888feef1ac5..e89e3e2145e5 100644 --- a/drivers/i2c/busses/i2c-designware-core.c +++ b/drivers/i2c/busses/i2c-designware-core.c | |||
| @@ -613,7 +613,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) | |||
| 613 | mutex_lock(&dev->lock); | 613 | mutex_lock(&dev->lock); |
| 614 | pm_runtime_get_sync(dev->dev); | 614 | pm_runtime_get_sync(dev->dev); |
| 615 | 615 | ||
| 616 | INIT_COMPLETION(dev->cmd_complete); | 616 | reinit_completion(&dev->cmd_complete); |
| 617 | dev->msgs = msgs; | 617 | dev->msgs = msgs; |
| 618 | dev->msgs_num = num; | 618 | dev->msgs_num = num; |
| 619 | dev->cmd_err = 0; | 619 | dev->cmd_err = 0; |
diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c index 1672effbcebb..0043ede234c2 100644 --- a/drivers/i2c/busses/i2c-ismt.c +++ b/drivers/i2c/busses/i2c-ismt.c | |||
| @@ -541,7 +541,7 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr, | |||
| 541 | desc->dptr_high = upper_32_bits(dma_addr); | 541 | desc->dptr_high = upper_32_bits(dma_addr); |
| 542 | } | 542 | } |
| 543 | 543 | ||
| 544 | INIT_COMPLETION(priv->cmp); | 544 | reinit_completion(&priv->cmp); |
| 545 | 545 | ||
| 546 | /* Add the descriptor */ | 546 | /* Add the descriptor */ |
| 547 | ismt_submit_desc(priv); | 547 | ismt_submit_desc(priv); |
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c index b7c857774708..3aedd86a6468 100644 --- a/drivers/i2c/busses/i2c-mxs.c +++ b/drivers/i2c/busses/i2c-mxs.c | |||
| @@ -505,7 +505,7 @@ static int mxs_i2c_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, | |||
| 505 | return err; | 505 | return err; |
| 506 | } | 506 | } |
| 507 | } else { | 507 | } else { |
| 508 | INIT_COMPLETION(i2c->cmd_complete); | 508 | reinit_completion(&i2c->cmd_complete); |
| 509 | ret = mxs_i2c_dma_setup_xfer(adap, msg, flags); | 509 | ret = mxs_i2c_dma_setup_xfer(adap, msg, flags); |
| 510 | if (ret) | 510 | if (ret) |
| 511 | return ret; | 511 | return ret; |
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 9967a6f9c2ff..a6a891d7970d 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c | |||
| @@ -543,7 +543,7 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap, | |||
| 543 | w |= OMAP_I2C_BUF_RXFIF_CLR | OMAP_I2C_BUF_TXFIF_CLR; | 543 | w |= OMAP_I2C_BUF_RXFIF_CLR | OMAP_I2C_BUF_TXFIF_CLR; |
| 544 | omap_i2c_write_reg(dev, OMAP_I2C_BUF_REG, w); | 544 | omap_i2c_write_reg(dev, OMAP_I2C_BUF_REG, w); |
| 545 | 545 | ||
| 546 | INIT_COMPLETION(dev->cmd_complete); | 546 | reinit_completion(&dev->cmd_complete); |
| 547 | dev->cmd_err = 0; | 547 | dev->cmd_err = 0; |
| 548 | 548 | ||
| 549 | w = OMAP_I2C_CON_EN | OMAP_I2C_CON_MST | OMAP_I2C_CON_STT; | 549 | w = OMAP_I2C_CON_EN | OMAP_I2C_CON_MST | OMAP_I2C_CON_STT; |
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index c457cb447c66..e661edee4d0c 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c | |||
| @@ -544,7 +544,7 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, | |||
| 544 | i2c_dev->msg_buf_remaining = msg->len; | 544 | i2c_dev->msg_buf_remaining = msg->len; |
| 545 | i2c_dev->msg_err = I2C_ERR_NONE; | 545 | i2c_dev->msg_err = I2C_ERR_NONE; |
| 546 | i2c_dev->msg_read = (msg->flags & I2C_M_RD); | 546 | i2c_dev->msg_read = (msg->flags & I2C_M_RD); |
| 547 | INIT_COMPLETION(i2c_dev->msg_complete); | 547 | reinit_completion(&i2c_dev->msg_complete); |
| 548 | 548 | ||
| 549 | packet_header = (0 << PACKET_HEADER0_HEADER_SIZE_SHIFT) | | 549 | packet_header = (0 << PACKET_HEADER0_HEADER_SIZE_SHIFT) | |
| 550 | PACKET_HEADER0_PROTOCOL_I2C | | 550 | PACKET_HEADER0_PROTOCOL_I2C | |
diff --git a/drivers/i2c/busses/i2c-wmt.c b/drivers/i2c/busses/i2c-wmt.c index c65da3d913a0..31395fa8121d 100644 --- a/drivers/i2c/busses/i2c-wmt.c +++ b/drivers/i2c/busses/i2c-wmt.c | |||
| @@ -158,7 +158,7 @@ static int wmt_i2c_write(struct i2c_adapter *adap, struct i2c_msg *pmsg, | |||
| 158 | writew(val, i2c_dev->base + REG_CR); | 158 | writew(val, i2c_dev->base + REG_CR); |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | INIT_COMPLETION(i2c_dev->complete); | 161 | reinit_completion(&i2c_dev->complete); |
| 162 | 162 | ||
| 163 | if (i2c_dev->mode == I2C_MODE_STANDARD) | 163 | if (i2c_dev->mode == I2C_MODE_STANDARD) |
| 164 | tcr_val = TCR_STANDARD_MODE; | 164 | tcr_val = TCR_STANDARD_MODE; |
| @@ -247,7 +247,7 @@ static int wmt_i2c_read(struct i2c_adapter *adap, struct i2c_msg *pmsg, | |||
| 247 | writew(val, i2c_dev->base + REG_CR); | 247 | writew(val, i2c_dev->base + REG_CR); |
| 248 | } | 248 | } |
| 249 | 249 | ||
| 250 | INIT_COMPLETION(i2c_dev->complete); | 250 | reinit_completion(&i2c_dev->complete); |
| 251 | 251 | ||
| 252 | if (i2c_dev->mode == I2C_MODE_STANDARD) | 252 | if (i2c_dev->mode == I2C_MODE_STANDARD) |
| 253 | tcr_val = TCR_STANDARD_MODE; | 253 | tcr_val = TCR_STANDARD_MODE; |
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); |
diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index d53e0b72a407..4204841cdc49 100644 --- a/drivers/input/touchscreen/cyttsp_core.c +++ b/drivers/input/touchscreen/cyttsp_core.c | |||
| @@ -242,7 +242,7 @@ static int cyttsp_soft_reset(struct cyttsp *ts) | |||
| 242 | int retval; | 242 | int retval; |
| 243 | 243 | ||
| 244 | /* wait for interrupt to set ready completion */ | 244 | /* wait for interrupt to set ready completion */ |
| 245 | INIT_COMPLETION(ts->bl_ready); | 245 | reinit_completion(&ts->bl_ready); |
| 246 | ts->state = CY_BL_STATE; | 246 | ts->state = CY_BL_STATE; |
| 247 | 247 | ||
| 248 | enable_irq(ts->irq); | 248 | enable_irq(ts->irq); |
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 50ea7ed24dce..81b0fa660452 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c | |||
| @@ -950,7 +950,7 @@ static int crypt_convert(struct crypt_config *cc, | |||
| 950 | /* async */ | 950 | /* async */ |
| 951 | case -EBUSY: | 951 | case -EBUSY: |
| 952 | wait_for_completion(&ctx->restart); | 952 | wait_for_completion(&ctx->restart); |
| 953 | INIT_COMPLETION(ctx->restart); | 953 | reinit_completion(&ctx->restart); |
| 954 | /* fall through*/ | 954 | /* fall through*/ |
| 955 | case -EINPROGRESS: | 955 | case -EINPROGRESS: |
| 956 | this_cc->req = NULL; | 956 | this_cc->req = NULL; |
diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c index 4c1105977090..281916591437 100644 --- a/drivers/media/platform/blackfin/bfin_capture.c +++ b/drivers/media/platform/blackfin/bfin_capture.c | |||
| @@ -422,7 +422,7 @@ static int bcap_start_streaming(struct vb2_queue *vq, unsigned int count) | |||
| 422 | return ret; | 422 | return ret; |
| 423 | } | 423 | } |
| 424 | 424 | ||
| 425 | INIT_COMPLETION(bcap_dev->comp); | 425 | reinit_completion(&bcap_dev->comp); |
| 426 | bcap_dev->stop = false; | 426 | bcap_dev->stop = false; |
| 427 | return 0; | 427 | return 0; |
| 428 | } | 428 | } |
diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c index 97c2c18803ef..9cf6731fb816 100644 --- a/drivers/media/radio/radio-wl1273.c +++ b/drivers/media/radio/radio-wl1273.c | |||
| @@ -375,7 +375,7 @@ static int wl1273_fm_set_tx_freq(struct wl1273_device *radio, unsigned int freq) | |||
| 375 | if (r) | 375 | if (r) |
| 376 | return r; | 376 | return r; |
| 377 | 377 | ||
| 378 | INIT_COMPLETION(radio->busy); | 378 | reinit_completion(&radio->busy); |
| 379 | 379 | ||
| 380 | /* wait for the FR IRQ */ | 380 | /* wait for the FR IRQ */ |
| 381 | r = wait_for_completion_timeout(&radio->busy, msecs_to_jiffies(2000)); | 381 | r = wait_for_completion_timeout(&radio->busy, msecs_to_jiffies(2000)); |
| @@ -389,7 +389,7 @@ static int wl1273_fm_set_tx_freq(struct wl1273_device *radio, unsigned int freq) | |||
| 389 | if (r) | 389 | if (r) |
| 390 | return r; | 390 | return r; |
| 391 | 391 | ||
| 392 | INIT_COMPLETION(radio->busy); | 392 | reinit_completion(&radio->busy); |
| 393 | 393 | ||
| 394 | /* wait for the POWER_ENB IRQ */ | 394 | /* wait for the POWER_ENB IRQ */ |
| 395 | r = wait_for_completion_timeout(&radio->busy, msecs_to_jiffies(1000)); | 395 | r = wait_for_completion_timeout(&radio->busy, msecs_to_jiffies(1000)); |
| @@ -444,7 +444,7 @@ static int wl1273_fm_set_rx_freq(struct wl1273_device *radio, unsigned int freq) | |||
| 444 | goto err; | 444 | goto err; |
| 445 | } | 445 | } |
| 446 | 446 | ||
| 447 | INIT_COMPLETION(radio->busy); | 447 | reinit_completion(&radio->busy); |
| 448 | 448 | ||
| 449 | r = wait_for_completion_timeout(&radio->busy, msecs_to_jiffies(2000)); | 449 | r = wait_for_completion_timeout(&radio->busy, msecs_to_jiffies(2000)); |
| 450 | if (!r) { | 450 | if (!r) { |
| @@ -805,7 +805,7 @@ static int wl1273_fm_set_seek(struct wl1273_device *radio, | |||
| 805 | if (level < SCHAR_MIN || level > SCHAR_MAX) | 805 | if (level < SCHAR_MIN || level > SCHAR_MAX) |
| 806 | return -EINVAL; | 806 | return -EINVAL; |
| 807 | 807 | ||
| 808 | INIT_COMPLETION(radio->busy); | 808 | reinit_completion(&radio->busy); |
| 809 | dev_dbg(radio->dev, "%s: BUSY\n", __func__); | 809 | dev_dbg(radio->dev, "%s: BUSY\n", __func__); |
| 810 | 810 | ||
| 811 | r = core->write(core, WL1273_INT_MASK_SET, radio->irq_flags); | 811 | r = core->write(core, WL1273_INT_MASK_SET, radio->irq_flags); |
| @@ -847,7 +847,7 @@ static int wl1273_fm_set_seek(struct wl1273_device *radio, | |||
| 847 | if (r) | 847 | if (r) |
| 848 | goto out; | 848 | goto out; |
| 849 | 849 | ||
| 850 | INIT_COMPLETION(radio->busy); | 850 | reinit_completion(&radio->busy); |
| 851 | dev_dbg(radio->dev, "%s: BUSY\n", __func__); | 851 | dev_dbg(radio->dev, "%s: BUSY\n", __func__); |
| 852 | 852 | ||
| 853 | r = core->write(core, WL1273_TUNER_MODE_SET, TUNER_MODE_AUTO_SEEK); | 853 | r = core->write(core, WL1273_TUNER_MODE_SET, TUNER_MODE_AUTO_SEEK); |
diff --git a/drivers/media/radio/si470x/radio-si470x-common.c b/drivers/media/radio/si470x/radio-si470x-common.c index 5c57e5b0f949..0bd250068285 100644 --- a/drivers/media/radio/si470x/radio-si470x-common.c +++ b/drivers/media/radio/si470x/radio-si470x-common.c | |||
| @@ -218,7 +218,7 @@ static int si470x_set_chan(struct si470x_device *radio, unsigned short chan) | |||
| 218 | goto done; | 218 | goto done; |
| 219 | 219 | ||
| 220 | /* wait till tune operation has completed */ | 220 | /* wait till tune operation has completed */ |
| 221 | INIT_COMPLETION(radio->completion); | 221 | reinit_completion(&radio->completion); |
| 222 | retval = wait_for_completion_timeout(&radio->completion, | 222 | retval = wait_for_completion_timeout(&radio->completion, |
| 223 | msecs_to_jiffies(tune_timeout)); | 223 | msecs_to_jiffies(tune_timeout)); |
| 224 | if (!retval) | 224 | if (!retval) |
| @@ -341,7 +341,7 @@ static int si470x_set_seek(struct si470x_device *radio, | |||
| 341 | return retval; | 341 | return retval; |
| 342 | 342 | ||
| 343 | /* wait till tune operation has completed */ | 343 | /* wait till tune operation has completed */ |
| 344 | INIT_COMPLETION(radio->completion); | 344 | reinit_completion(&radio->completion); |
| 345 | retval = wait_for_completion_timeout(&radio->completion, | 345 | retval = wait_for_completion_timeout(&radio->completion, |
| 346 | msecs_to_jiffies(seek_timeout)); | 346 | msecs_to_jiffies(seek_timeout)); |
| 347 | if (!retval) | 347 | if (!retval) |
diff --git a/drivers/media/rc/iguanair.c b/drivers/media/rc/iguanair.c index 19632b1c2190..b53626ba6f49 100644 --- a/drivers/media/rc/iguanair.c +++ b/drivers/media/rc/iguanair.c | |||
| @@ -207,7 +207,7 @@ static int iguanair_send(struct iguanair *ir, unsigned size) | |||
| 207 | { | 207 | { |
| 208 | int rc; | 208 | int rc; |
| 209 | 209 | ||
| 210 | INIT_COMPLETION(ir->completion); | 210 | reinit_completion(&ir->completion); |
| 211 | 211 | ||
| 212 | ir->urb_out->transfer_buffer_length = size; | 212 | ir->urb_out->transfer_buffer_length = size; |
| 213 | rc = usb_submit_urb(ir->urb_out, GFP_KERNEL); | 213 | rc = usb_submit_urb(ir->urb_out, GFP_KERNEL); |
diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c index bbf4aea1627d..a0547dbf9806 100644 --- a/drivers/memstick/core/memstick.c +++ b/drivers/memstick/core/memstick.c | |||
| @@ -253,7 +253,7 @@ void memstick_new_req(struct memstick_host *host) | |||
| 253 | { | 253 | { |
| 254 | if (host->card) { | 254 | if (host->card) { |
| 255 | host->retries = cmd_retries; | 255 | host->retries = cmd_retries; |
| 256 | INIT_COMPLETION(host->card->mrq_complete); | 256 | reinit_completion(&host->card->mrq_complete); |
| 257 | host->request(host); | 257 | host->request(host); |
| 258 | } | 258 | } |
| 259 | } | 259 | } |
diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c index 1b6e91345222..31727bf285d0 100644 --- a/drivers/memstick/host/r592.c +++ b/drivers/memstick/host/r592.c | |||
| @@ -290,7 +290,7 @@ static int r592_transfer_fifo_dma(struct r592_device *dev) | |||
| 290 | dbg_verbose("doing dma transfer"); | 290 | dbg_verbose("doing dma transfer"); |
| 291 | 291 | ||
| 292 | dev->dma_error = 0; | 292 | dev->dma_error = 0; |
| 293 | INIT_COMPLETION(dev->dma_done); | 293 | reinit_completion(&dev->dma_done); |
| 294 | 294 | ||
| 295 | /* TODO: hidden assumption about nenth beeing always 1 */ | 295 | /* TODO: hidden assumption about nenth beeing always 1 */ |
| 296 | sg_count = dma_map_sg(&dev->pci_dev->dev, &dev->req->sg, 1, is_write ? | 296 | sg_count = dma_map_sg(&dev->pci_dev->dev, &dev->req->sg, 1, is_write ? |
diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index 914cc9b2caad..8aa42e738acc 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c | |||
| @@ -493,7 +493,7 @@ static int mic_remove_device(struct mic_device_desc __iomem *d, | |||
| 493 | ioread8(&dc->config_change), ioread8(&d->type), mvdev); | 493 | ioread8(&dc->config_change), ioread8(&d->type), mvdev); |
| 494 | 494 | ||
| 495 | status = ioread8(&d->status); | 495 | status = ioread8(&d->status); |
| 496 | INIT_COMPLETION(mvdev->reset_done); | 496 | reinit_completion(&mvdev->reset_done); |
| 497 | unregister_virtio_device(&mvdev->vdev); | 497 | unregister_virtio_device(&mvdev->vdev); |
| 498 | mic_free_card_irq(mvdev->virtio_cookie, mvdev); | 498 | mic_free_card_irq(mvdev->virtio_cookie, mvdev); |
| 499 | if (status & VIRTIO_CONFIG_S_DRIVER_OK) | 499 | if (status & VIRTIO_CONFIG_S_DRIVER_OK) |
diff --git a/drivers/misc/mic/host/mic_boot.c b/drivers/misc/mic/host/mic_boot.c index b079c65eed6d..7558d9186438 100644 --- a/drivers/misc/mic/host/mic_boot.c +++ b/drivers/misc/mic/host/mic_boot.c | |||
| @@ -38,7 +38,7 @@ static void mic_reset(struct mic_device *mdev) | |||
| 38 | 38 | ||
| 39 | #define MIC_RESET_TO (45) | 39 | #define MIC_RESET_TO (45) |
| 40 | 40 | ||
| 41 | INIT_COMPLETION(mdev->reset_wait); | 41 | reinit_completion(&mdev->reset_wait); |
| 42 | mdev->ops->reset_fw_ready(mdev); | 42 | mdev->ops->reset_fw_ready(mdev); |
| 43 | mdev->ops->reset(mdev); | 43 | mdev->ops->reset(mdev); |
| 44 | 44 | ||
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index 83907c720594..96853a09788a 100644 --- a/drivers/misc/ti-st/st_kim.c +++ b/drivers/misc/ti-st/st_kim.c | |||
| @@ -218,7 +218,7 @@ static long read_local_version(struct kim_data_s *kim_gdata, char *bts_scr_name) | |||
| 218 | 218 | ||
| 219 | pr_debug("%s", __func__); | 219 | pr_debug("%s", __func__); |
| 220 | 220 | ||
| 221 | INIT_COMPLETION(kim_gdata->kim_rcvd); | 221 | reinit_completion(&kim_gdata->kim_rcvd); |
| 222 | if (4 != st_int_write(kim_gdata->core_data, read_ver_cmd, 4)) { | 222 | if (4 != st_int_write(kim_gdata->core_data, read_ver_cmd, 4)) { |
| 223 | pr_err("kim: couldn't write 4 bytes"); | 223 | pr_err("kim: couldn't write 4 bytes"); |
| 224 | return -EIO; | 224 | return -EIO; |
| @@ -229,7 +229,7 @@ static long read_local_version(struct kim_data_s *kim_gdata, char *bts_scr_name) | |||
| 229 | pr_err(" waiting for ver info- timed out "); | 229 | pr_err(" waiting for ver info- timed out "); |
| 230 | return -ETIMEDOUT; | 230 | return -ETIMEDOUT; |
| 231 | } | 231 | } |
| 232 | INIT_COMPLETION(kim_gdata->kim_rcvd); | 232 | reinit_completion(&kim_gdata->kim_rcvd); |
| 233 | /* the positions 12 & 13 in the response buffer provide with the | 233 | /* the positions 12 & 13 in the response buffer provide with the |
| 234 | * chip, major & minor numbers | 234 | * chip, major & minor numbers |
| 235 | */ | 235 | */ |
| @@ -362,7 +362,7 @@ static long download_firmware(struct kim_data_s *kim_gdata) | |||
| 362 | /* reinit completion before sending for the | 362 | /* reinit completion before sending for the |
| 363 | * relevant wait | 363 | * relevant wait |
| 364 | */ | 364 | */ |
| 365 | INIT_COMPLETION(kim_gdata->kim_rcvd); | 365 | reinit_completion(&kim_gdata->kim_rcvd); |
| 366 | 366 | ||
| 367 | /* | 367 | /* |
| 368 | * Free space found in uart buffer, call st_int_write | 368 | * Free space found in uart buffer, call st_int_write |
| @@ -398,7 +398,7 @@ static long download_firmware(struct kim_data_s *kim_gdata) | |||
| 398 | release_firmware(kim_gdata->fw_entry); | 398 | release_firmware(kim_gdata->fw_entry); |
| 399 | return -ETIMEDOUT; | 399 | return -ETIMEDOUT; |
| 400 | } | 400 | } |
| 401 | INIT_COMPLETION(kim_gdata->kim_rcvd); | 401 | reinit_completion(&kim_gdata->kim_rcvd); |
| 402 | break; | 402 | break; |
| 403 | case ACTION_DELAY: /* sleep */ | 403 | case ACTION_DELAY: /* sleep */ |
| 404 | pr_info("sleep command in scr"); | 404 | pr_info("sleep command in scr"); |
| @@ -474,7 +474,7 @@ long st_kim_start(void *kim_data) | |||
| 474 | gpio_set_value(kim_gdata->nshutdown, GPIO_HIGH); | 474 | gpio_set_value(kim_gdata->nshutdown, GPIO_HIGH); |
| 475 | mdelay(100); | 475 | mdelay(100); |
| 476 | /* re-initialize the completion */ | 476 | /* re-initialize the completion */ |
| 477 | INIT_COMPLETION(kim_gdata->ldisc_installed); | 477 | reinit_completion(&kim_gdata->ldisc_installed); |
| 478 | /* send notification to UIM */ | 478 | /* send notification to UIM */ |
| 479 | kim_gdata->ldisc_install = 1; | 479 | kim_gdata->ldisc_install = 1; |
| 480 | pr_info("ldisc_install = 1"); | 480 | pr_info("ldisc_install = 1"); |
| @@ -525,7 +525,7 @@ long st_kim_stop(void *kim_data) | |||
| 525 | kim_gdata->kim_pdev->dev.platform_data; | 525 | kim_gdata->kim_pdev->dev.platform_data; |
| 526 | struct tty_struct *tty = kim_gdata->core_data->tty; | 526 | struct tty_struct *tty = kim_gdata->core_data->tty; |
| 527 | 527 | ||
| 528 | INIT_COMPLETION(kim_gdata->ldisc_installed); | 528 | reinit_completion(&kim_gdata->ldisc_installed); |
| 529 | 529 | ||
| 530 | if (tty) { /* can be called before ldisc is installed */ | 530 | if (tty) { /* can be called before ldisc is installed */ |
| 531 | /* Flush any pending characters in the driver and discipline. */ | 531 | /* Flush any pending characters in the driver and discipline. */ |
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 4edea7f4462f..9dfdb06c508b 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c | |||
| @@ -396,7 +396,7 @@ static void wait_op_done(struct mxc_nand_host *host, int useirq) | |||
| 396 | 396 | ||
| 397 | if (useirq) { | 397 | if (useirq) { |
| 398 | if (!host->devtype_data->check_int(host)) { | 398 | if (!host->devtype_data->check_int(host)) { |
| 399 | INIT_COMPLETION(host->op_completion); | 399 | reinit_completion(&host->op_completion); |
| 400 | irq_control(host, 1); | 400 | irq_control(host, 1); |
| 401 | wait_for_completion(&host->op_completion); | 401 | wait_for_completion(&host->op_completion); |
| 402 | } | 402 | } |
diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/r852.c index 9dcf02d22aa8..325930db3f04 100644 --- a/drivers/mtd/nand/r852.c +++ b/drivers/mtd/nand/r852.c | |||
| @@ -181,7 +181,7 @@ static void r852_do_dma(struct r852_device *dev, uint8_t *buf, int do_read) | |||
| 181 | /* Set dma direction */ | 181 | /* Set dma direction */ |
| 182 | dev->dma_dir = do_read; | 182 | dev->dma_dir = do_read; |
| 183 | dev->dma_stage = 1; | 183 | dev->dma_stage = 1; |
| 184 | INIT_COMPLETION(dev->dma_done); | 184 | reinit_completion(&dev->dma_done); |
| 185 | 185 | ||
| 186 | dbg_verbose("doing dma %s ", do_read ? "read" : "write"); | 186 | dbg_verbose("doing dma %s ", do_read ? "read" : "write"); |
| 187 | 187 | ||
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index 2362909d20c0..6547c84afc3a 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c | |||
| @@ -159,7 +159,7 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state) | |||
| 159 | syscfg = read_reg(c, ONENAND_REG_SYS_CFG1); | 159 | syscfg = read_reg(c, ONENAND_REG_SYS_CFG1); |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | INIT_COMPLETION(c->irq_done); | 162 | reinit_completion(&c->irq_done); |
| 163 | if (c->gpio_irq) { | 163 | if (c->gpio_irq) { |
| 164 | result = gpio_get_value(c->gpio_irq); | 164 | result = gpio_get_value(c->gpio_irq); |
| 165 | if (result == -1) { | 165 | if (result == -1) { |
| @@ -349,7 +349,7 @@ static int omap3_onenand_read_bufferram(struct mtd_info *mtd, int area, | |||
| 349 | omap_set_dma_dest_params(c->dma_channel, 0, OMAP_DMA_AMODE_POST_INC, | 349 | omap_set_dma_dest_params(c->dma_channel, 0, OMAP_DMA_AMODE_POST_INC, |
| 350 | dma_dst, 0, 0); | 350 | dma_dst, 0, 0); |
| 351 | 351 | ||
| 352 | INIT_COMPLETION(c->dma_done); | 352 | reinit_completion(&c->dma_done); |
| 353 | omap_start_dma(c->dma_channel); | 353 | omap_start_dma(c->dma_channel); |
| 354 | 354 | ||
| 355 | timeout = jiffies + msecs_to_jiffies(20); | 355 | timeout = jiffies + msecs_to_jiffies(20); |
| @@ -420,7 +420,7 @@ static int omap3_onenand_write_bufferram(struct mtd_info *mtd, int area, | |||
| 420 | omap_set_dma_dest_params(c->dma_channel, 0, OMAP_DMA_AMODE_POST_INC, | 420 | omap_set_dma_dest_params(c->dma_channel, 0, OMAP_DMA_AMODE_POST_INC, |
| 421 | dma_dst, 0, 0); | 421 | dma_dst, 0, 0); |
| 422 | 422 | ||
| 423 | INIT_COMPLETION(c->dma_done); | 423 | reinit_completion(&c->dma_done); |
| 424 | omap_start_dma(c->dma_channel); | 424 | omap_start_dma(c->dma_channel); |
| 425 | 425 | ||
| 426 | timeout = jiffies + msecs_to_jiffies(20); | 426 | timeout = jiffies + msecs_to_jiffies(20); |
| @@ -499,7 +499,7 @@ static int omap2_onenand_read_bufferram(struct mtd_info *mtd, int area, | |||
| 499 | omap_set_dma_dest_params(c->dma_channel, 0, OMAP_DMA_AMODE_POST_INC, | 499 | omap_set_dma_dest_params(c->dma_channel, 0, OMAP_DMA_AMODE_POST_INC, |
| 500 | dma_dst, 0, 0); | 500 | dma_dst, 0, 0); |
| 501 | 501 | ||
| 502 | INIT_COMPLETION(c->dma_done); | 502 | reinit_completion(&c->dma_done); |
| 503 | omap_start_dma(c->dma_channel); | 503 | omap_start_dma(c->dma_channel); |
| 504 | wait_for_completion(&c->dma_done); | 504 | wait_for_completion(&c->dma_done); |
| 505 | 505 | ||
| @@ -544,7 +544,7 @@ static int omap2_onenand_write_bufferram(struct mtd_info *mtd, int area, | |||
| 544 | omap_set_dma_dest_params(c->dma_channel, 0, OMAP_DMA_AMODE_POST_INC, | 544 | omap_set_dma_dest_params(c->dma_channel, 0, OMAP_DMA_AMODE_POST_INC, |
| 545 | dma_dst, 0, 0); | 545 | dma_dst, 0, 0); |
| 546 | 546 | ||
| 547 | INIT_COMPLETION(c->dma_done); | 547 | reinit_completion(&c->dma_done); |
| 548 | omap_start_dma(c->dma_channel); | 548 | omap_start_dma(c->dma_channel); |
| 549 | wait_for_completion(&c->dma_done); | 549 | wait_for_completion(&c->dma_done); |
| 550 | 550 | ||
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c index 09810ddd11ec..a01a6a74ee3a 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | |||
| @@ -3537,7 +3537,7 @@ int qlcnic_83xx_resume(struct qlcnic_adapter *adapter) | |||
| 3537 | 3537 | ||
| 3538 | void qlcnic_83xx_reinit_mbx_work(struct qlcnic_mailbox *mbx) | 3538 | void qlcnic_83xx_reinit_mbx_work(struct qlcnic_mailbox *mbx) |
| 3539 | { | 3539 | { |
| 3540 | INIT_COMPLETION(mbx->completion); | 3540 | reinit_completion(&mbx->completion); |
| 3541 | set_bit(QLC_83XX_MBX_READY, &mbx->status); | 3541 | set_bit(QLC_83XX_MBX_READY, &mbx->status); |
| 3542 | } | 3542 | } |
| 3543 | 3543 | ||
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 6f10b4964726..2cbe1c249996 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c | |||
| @@ -561,7 +561,7 @@ at86rf230_xmit(struct ieee802154_dev *dev, struct sk_buff *skb) | |||
| 561 | 561 | ||
| 562 | spin_lock_irqsave(&lp->lock, flags); | 562 | spin_lock_irqsave(&lp->lock, flags); |
| 563 | lp->is_tx = 1; | 563 | lp->is_tx = 1; |
| 564 | INIT_COMPLETION(lp->tx_complete); | 564 | reinit_completion(&lp->tx_complete); |
| 565 | spin_unlock_irqrestore(&lp->lock, flags); | 565 | spin_unlock_irqrestore(&lp->lock, flags); |
| 566 | 566 | ||
| 567 | rc = at86rf230_write_fbuf(lp, skb->data, skb->len); | 567 | rc = at86rf230_write_fbuf(lp, skb->data, skb->len); |
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c index 0632d34905c7..c6e46d6e9f75 100644 --- a/drivers/net/ieee802154/mrf24j40.c +++ b/drivers/net/ieee802154/mrf24j40.c | |||
| @@ -343,7 +343,7 @@ static int mrf24j40_tx(struct ieee802154_dev *dev, struct sk_buff *skb) | |||
| 343 | if (ret) | 343 | if (ret) |
| 344 | goto err; | 344 | goto err; |
| 345 | 345 | ||
| 346 | INIT_COMPLETION(devrec->tx_complete); | 346 | reinit_completion(&devrec->tx_complete); |
| 347 | 347 | ||
| 348 | /* Set TXNTRIG bit of TXNCON to send packet */ | 348 | /* Set TXNTRIG bit of TXNCON to send packet */ |
| 349 | ret = read_short_reg(devrec, REG_TXNCON, &val); | 349 | ret = read_short_reg(devrec, REG_TXNCON, &val); |
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c index 3118d7506734..edae50b52806 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c | |||
| @@ -534,7 +534,7 @@ int ath10k_htc_wait_target(struct ath10k_htc *htc) | |||
| 534 | u16 credit_count; | 534 | u16 credit_count; |
| 535 | u16 credit_size; | 535 | u16 credit_size; |
| 536 | 536 | ||
| 537 | INIT_COMPLETION(htc->ctl_resp); | 537 | reinit_completion(&htc->ctl_resp); |
| 538 | 538 | ||
| 539 | status = ath10k_hif_start(htc->ar); | 539 | status = ath10k_hif_start(htc->ar); |
| 540 | if (status) { | 540 | if (status) { |
| @@ -669,7 +669,7 @@ int ath10k_htc_connect_service(struct ath10k_htc *htc, | |||
| 669 | req_msg->flags = __cpu_to_le16(flags); | 669 | req_msg->flags = __cpu_to_le16(flags); |
| 670 | req_msg->service_id = __cpu_to_le16(conn_req->service_id); | 670 | req_msg->service_id = __cpu_to_le16(conn_req->service_id); |
| 671 | 671 | ||
| 672 | INIT_COMPLETION(htc->ctl_resp); | 672 | reinit_completion(&htc->ctl_resp); |
| 673 | 673 | ||
| 674 | status = ath10k_htc_send(htc, ATH10K_HTC_EP_0, skb); | 674 | status = ath10k_htc_send(htc, ATH10K_HTC_EP_0, skb); |
| 675 | if (status) { | 675 | if (status) { |
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 0b1cc516e778..97ac8c87cba2 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c | |||
| @@ -92,7 +92,7 @@ static int ath10k_install_key(struct ath10k_vif *arvif, | |||
| 92 | 92 | ||
| 93 | lockdep_assert_held(&ar->conf_mutex); | 93 | lockdep_assert_held(&ar->conf_mutex); |
| 94 | 94 | ||
| 95 | INIT_COMPLETION(ar->install_key_done); | 95 | reinit_completion(&ar->install_key_done); |
| 96 | 96 | ||
| 97 | ret = ath10k_send_key(arvif, key, cmd, macaddr); | 97 | ret = ath10k_send_key(arvif, key, cmd, macaddr); |
| 98 | if (ret) | 98 | if (ret) |
| @@ -438,7 +438,7 @@ static int ath10k_vdev_start(struct ath10k_vif *arvif) | |||
| 438 | 438 | ||
| 439 | lockdep_assert_held(&ar->conf_mutex); | 439 | lockdep_assert_held(&ar->conf_mutex); |
| 440 | 440 | ||
| 441 | INIT_COMPLETION(ar->vdev_setup_done); | 441 | reinit_completion(&ar->vdev_setup_done); |
| 442 | 442 | ||
| 443 | arg.vdev_id = arvif->vdev_id; | 443 | arg.vdev_id = arvif->vdev_id; |
| 444 | arg.dtim_period = arvif->dtim_period; | 444 | arg.dtim_period = arvif->dtim_period; |
| @@ -491,7 +491,7 @@ static int ath10k_vdev_stop(struct ath10k_vif *arvif) | |||
| 491 | 491 | ||
| 492 | lockdep_assert_held(&ar->conf_mutex); | 492 | lockdep_assert_held(&ar->conf_mutex); |
| 493 | 493 | ||
| 494 | INIT_COMPLETION(ar->vdev_setup_done); | 494 | reinit_completion(&ar->vdev_setup_done); |
| 495 | 495 | ||
| 496 | ret = ath10k_wmi_vdev_stop(ar, arvif->vdev_id); | 496 | ret = ath10k_wmi_vdev_stop(ar, arvif->vdev_id); |
| 497 | if (ret) { | 497 | if (ret) { |
| @@ -1666,7 +1666,7 @@ void ath10k_offchan_tx_work(struct work_struct *work) | |||
| 1666 | } | 1666 | } |
| 1667 | 1667 | ||
| 1668 | spin_lock_bh(&ar->data_lock); | 1668 | spin_lock_bh(&ar->data_lock); |
| 1669 | INIT_COMPLETION(ar->offchan_tx_completed); | 1669 | reinit_completion(&ar->offchan_tx_completed); |
| 1670 | ar->offchan_tx_skb = skb; | 1670 | ar->offchan_tx_skb = skb; |
| 1671 | spin_unlock_bh(&ar->data_lock); | 1671 | spin_unlock_bh(&ar->data_lock); |
| 1672 | 1672 | ||
| @@ -2476,8 +2476,8 @@ static int ath10k_hw_scan(struct ieee80211_hw *hw, | |||
| 2476 | goto exit; | 2476 | goto exit; |
| 2477 | } | 2477 | } |
| 2478 | 2478 | ||
| 2479 | INIT_COMPLETION(ar->scan.started); | 2479 | reinit_completion(&ar->scan.started); |
| 2480 | INIT_COMPLETION(ar->scan.completed); | 2480 | reinit_completion(&ar->scan.completed); |
| 2481 | ar->scan.in_progress = true; | 2481 | ar->scan.in_progress = true; |
| 2482 | ar->scan.aborting = false; | 2482 | ar->scan.aborting = false; |
| 2483 | ar->scan.is_roc = false; | 2483 | ar->scan.is_roc = false; |
| @@ -2832,9 +2832,9 @@ static int ath10k_remain_on_channel(struct ieee80211_hw *hw, | |||
| 2832 | goto exit; | 2832 | goto exit; |
| 2833 | } | 2833 | } |
| 2834 | 2834 | ||
| 2835 | INIT_COMPLETION(ar->scan.started); | 2835 | reinit_completion(&ar->scan.started); |
| 2836 | INIT_COMPLETION(ar->scan.completed); | 2836 | reinit_completion(&ar->scan.completed); |
| 2837 | INIT_COMPLETION(ar->scan.on_channel); | 2837 | reinit_completion(&ar->scan.on_channel); |
| 2838 | ar->scan.in_progress = true; | 2838 | ar->scan.in_progress = true; |
| 2839 | ar->scan.aborting = false; | 2839 | ar->scan.aborting = false; |
| 2840 | ar->scan.is_roc = true; | 2840 | ar->scan.is_roc = true; |
diff --git a/drivers/net/wireless/ath/carl9170/usb.c b/drivers/net/wireless/ath/carl9170/usb.c index 307bc0ddff99..ca115f33746f 100644 --- a/drivers/net/wireless/ath/carl9170/usb.c +++ b/drivers/net/wireless/ath/carl9170/usb.c | |||
| @@ -773,7 +773,7 @@ void carl9170_usb_stop(struct ar9170 *ar) | |||
| 773 | complete_all(&ar->cmd_wait); | 773 | complete_all(&ar->cmd_wait); |
| 774 | 774 | ||
| 775 | /* This is required to prevent an early completion on _start */ | 775 | /* This is required to prevent an early completion on _start */ |
| 776 | INIT_COMPLETION(ar->cmd_wait); | 776 | reinit_completion(&ar->cmd_wait); |
| 777 | 777 | ||
| 778 | /* | 778 | /* |
| 779 | * Note: | 779 | * Note: |
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c index 0a2844c48a60..fd30cddd5882 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c | |||
| @@ -250,7 +250,7 @@ int wil_reset(struct wil6210_priv *wil) | |||
| 250 | 250 | ||
| 251 | /* init after reset */ | 251 | /* init after reset */ |
| 252 | wil->pending_connect_cid = -1; | 252 | wil->pending_connect_cid = -1; |
| 253 | INIT_COMPLETION(wil->wmi_ready); | 253 | reinit_completion(&wil->wmi_ready); |
| 254 | 254 | ||
| 255 | /* TODO: release MAC reset */ | 255 | /* TODO: release MAC reset */ |
| 256 | wil6210_enable_irq(wil); | 256 | wil6210_enable_irq(wil); |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c index d7a974532909..5b5b952d47b1 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c | |||
| @@ -1148,7 +1148,7 @@ static s32 brcmf_p2p_af_searching_channel(struct brcmf_p2p_info *p2p) | |||
| 1148 | 1148 | ||
| 1149 | pri_vif = p2p->bss_idx[P2PAPI_BSSCFG_PRIMARY].vif; | 1149 | pri_vif = p2p->bss_idx[P2PAPI_BSSCFG_PRIMARY].vif; |
| 1150 | 1150 | ||
| 1151 | INIT_COMPLETION(afx_hdl->act_frm_scan); | 1151 | reinit_completion(&afx_hdl->act_frm_scan); |
| 1152 | set_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL, &p2p->status); | 1152 | set_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL, &p2p->status); |
| 1153 | afx_hdl->is_active = true; | 1153 | afx_hdl->is_active = true; |
| 1154 | afx_hdl->peer_chan = P2P_INVALID_CHANNEL; | 1154 | afx_hdl->peer_chan = P2P_INVALID_CHANNEL; |
| @@ -1501,7 +1501,7 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p, | |||
| 1501 | 1501 | ||
| 1502 | brcmf_dbg(TRACE, "Enter\n"); | 1502 | brcmf_dbg(TRACE, "Enter\n"); |
| 1503 | 1503 | ||
| 1504 | INIT_COMPLETION(p2p->send_af_done); | 1504 | reinit_completion(&p2p->send_af_done); |
| 1505 | clear_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED, &p2p->status); | 1505 | clear_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED, &p2p->status); |
| 1506 | clear_bit(BRCMF_P2P_STATUS_ACTION_TX_NOACK, &p2p->status); | 1506 | clear_bit(BRCMF_P2P_STATUS_ACTION_TX_NOACK, &p2p->status); |
| 1507 | 1507 | ||
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index 7ef0b4a181e1..84d94f572a46 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
| @@ -1619,7 +1619,7 @@ static void prepare_read_regs_int(struct zd_usb *usb, | |||
| 1619 | atomic_set(&intr->read_regs_enabled, 1); | 1619 | atomic_set(&intr->read_regs_enabled, 1); |
| 1620 | intr->read_regs.req = req; | 1620 | intr->read_regs.req = req; |
| 1621 | intr->read_regs.req_count = count; | 1621 | intr->read_regs.req_count = count; |
| 1622 | INIT_COMPLETION(intr->read_regs.completion); | 1622 | reinit_completion(&intr->read_regs.completion); |
| 1623 | spin_unlock_irq(&intr->lock); | 1623 | spin_unlock_irq(&intr->lock); |
| 1624 | } | 1624 | } |
| 1625 | 1625 | ||
diff --git a/drivers/parport/parport_ip32.c b/drivers/parport/parport_ip32.c index d4716273651e..c864f82bd37d 100644 --- a/drivers/parport/parport_ip32.c +++ b/drivers/parport/parport_ip32.c | |||
| @@ -1331,7 +1331,7 @@ static unsigned int parport_ip32_fwp_wait_interrupt(struct parport *p) | |||
| 1331 | break; | 1331 | break; |
| 1332 | 1332 | ||
| 1333 | /* Initialize mutex used to take interrupts into account */ | 1333 | /* Initialize mutex used to take interrupts into account */ |
| 1334 | INIT_COMPLETION(priv->irq_complete); | 1334 | reinit_completion(&priv->irq_complete); |
| 1335 | 1335 | ||
| 1336 | /* Enable serviceIntr */ | 1336 | /* Enable serviceIntr */ |
| 1337 | parport_ip32_frob_econtrol(p, ECR_SERVINTR, 0); | 1337 | parport_ip32_frob_econtrol(p, ECR_SERVINTR, 0); |
| @@ -1446,7 +1446,7 @@ static size_t parport_ip32_fifo_write_block_dma(struct parport *p, | |||
| 1446 | priv->irq_mode = PARPORT_IP32_IRQ_HERE; | 1446 | priv->irq_mode = PARPORT_IP32_IRQ_HERE; |
| 1447 | 1447 | ||
| 1448 | parport_ip32_dma_start(DMA_TO_DEVICE, (void *)buf, len); | 1448 | parport_ip32_dma_start(DMA_TO_DEVICE, (void *)buf, len); |
| 1449 | INIT_COMPLETION(priv->irq_complete); | 1449 | reinit_completion(&priv->irq_complete); |
| 1450 | parport_ip32_frob_econtrol(p, ECR_DMAEN | ECR_SERVINTR, ECR_DMAEN); | 1450 | parport_ip32_frob_econtrol(p, ECR_DMAEN | ECR_SERVINTR, ECR_DMAEN); |
| 1451 | 1451 | ||
| 1452 | nfault_timeout = min((unsigned long)physport->cad->timeout, | 1452 | nfault_timeout = min((unsigned long)physport->cad->timeout, |
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c index 8eea2efbbb6d..605a9be55129 100644 --- a/drivers/platform/x86/apple-gmux.c +++ b/drivers/platform/x86/apple-gmux.c | |||
| @@ -289,7 +289,7 @@ static int gmux_switchto(enum vga_switcheroo_client_id id) | |||
| 289 | static int gmux_set_discrete_state(struct apple_gmux_data *gmux_data, | 289 | static int gmux_set_discrete_state(struct apple_gmux_data *gmux_data, |
| 290 | enum vga_switcheroo_state state) | 290 | enum vga_switcheroo_state state) |
| 291 | { | 291 | { |
| 292 | INIT_COMPLETION(gmux_data->powerchange_done); | 292 | reinit_completion(&gmux_data->powerchange_done); |
| 293 | 293 | ||
| 294 | if (state == VGA_SWITCHEROO_ON) { | 294 | if (state == VGA_SWITCHEROO_ON) { |
| 295 | gmux_write8(gmux_data, GMUX_PORT_DISCRETE_POWER, 1); | 295 | gmux_write8(gmux_data, GMUX_PORT_DISCRETE_POWER, 1); |
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c index 754970717c31..3cb4178e397c 100644 --- a/drivers/power/ab8500_fg.c +++ b/drivers/power/ab8500_fg.c | |||
| @@ -574,8 +574,8 @@ int ab8500_fg_inst_curr_start(struct ab8500_fg *di) | |||
| 574 | } | 574 | } |
| 575 | 575 | ||
| 576 | /* Return and WFI */ | 576 | /* Return and WFI */ |
| 577 | INIT_COMPLETION(di->ab8500_fg_started); | 577 | reinit_completion(&di->ab8500_fg_started); |
| 578 | INIT_COMPLETION(di->ab8500_fg_complete); | 578 | reinit_completion(&di->ab8500_fg_complete); |
| 579 | enable_irq(di->irq); | 579 | enable_irq(di->irq); |
| 580 | 580 | ||
| 581 | /* Note: cc_lock is still locked */ | 581 | /* Note: cc_lock is still locked */ |
diff --git a/drivers/power/jz4740-battery.c b/drivers/power/jz4740-battery.c index d9686aa9270a..6c8931d4ad62 100644 --- a/drivers/power/jz4740-battery.c +++ b/drivers/power/jz4740-battery.c | |||
| @@ -73,7 +73,7 @@ static long jz_battery_read_voltage(struct jz_battery *battery) | |||
| 73 | 73 | ||
| 74 | mutex_lock(&battery->lock); | 74 | mutex_lock(&battery->lock); |
| 75 | 75 | ||
| 76 | INIT_COMPLETION(battery->read_completion); | 76 | reinit_completion(&battery->read_completion); |
| 77 | 77 | ||
| 78 | enable_irq(battery->irq); | 78 | enable_irq(battery->irq); |
| 79 | battery->cell->enable(battery->pdev); | 79 | battery->cell->enable(battery->pdev); |
diff --git a/drivers/rtc/rtc-hid-sensor-time.c b/drivers/rtc/rtc-hid-sensor-time.c index a34e5cfd2ab5..965a9da70867 100644 --- a/drivers/rtc/rtc-hid-sensor-time.c +++ b/drivers/rtc/rtc-hid-sensor-time.c | |||
| @@ -209,7 +209,7 @@ static int hid_rtc_read_time(struct device *dev, struct rtc_time *tm) | |||
| 209 | platform_get_drvdata(to_platform_device(dev)); | 209 | platform_get_drvdata(to_platform_device(dev)); |
| 210 | int ret; | 210 | int ret; |
| 211 | 211 | ||
| 212 | INIT_COMPLETION(time_state->comp_last_time); | 212 | reinit_completion(&time_state->comp_last_time); |
| 213 | /* get a report with all values through requesting one value */ | 213 | /* get a report with all values through requesting one value */ |
| 214 | sensor_hub_input_attr_get_raw_value(time_state->common_attributes.hsdev, | 214 | sensor_hub_input_attr_get_raw_value(time_state->common_attributes.hsdev, |
| 215 | HID_USAGE_SENSOR_TIME, hid_time_addresses[0], | 215 | HID_USAGE_SENSOR_TIME, hid_time_addresses[0], |
diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c index 4c332143a310..3ed666fe840a 100644 --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c | |||
| @@ -217,7 +217,7 @@ static int bcm2835_spi_start_transfer(struct spi_device *spi, | |||
| 217 | cs |= spi->chip_select; | 217 | cs |= spi->chip_select; |
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | INIT_COMPLETION(bs->done); | 220 | reinit_completion(&bs->done); |
| 221 | bs->tx_buf = tfr->tx_buf; | 221 | bs->tx_buf = tfr->tx_buf; |
| 222 | bs->rx_buf = tfr->rx_buf; | 222 | bs->rx_buf = tfr->rx_buf; |
| 223 | bs->len = tfr->len; | 223 | bs->len = tfr->len; |
diff --git a/drivers/spi/spi-clps711x.c b/drivers/spi/spi-clps711x.c index e2a5a426b2ef..6f03d7e6435d 100644 --- a/drivers/spi/spi-clps711x.c +++ b/drivers/spi/spi-clps711x.c | |||
| @@ -105,7 +105,7 @@ static int spi_clps711x_transfer_one_message(struct spi_master *master, | |||
| 105 | 105 | ||
| 106 | gpio_set_value(cs, !!(msg->spi->mode & SPI_CS_HIGH)); | 106 | gpio_set_value(cs, !!(msg->spi->mode & SPI_CS_HIGH)); |
| 107 | 107 | ||
| 108 | INIT_COMPLETION(hw->done); | 108 | reinit_completion(&hw->done); |
| 109 | 109 | ||
| 110 | hw->count = 0; | 110 | hw->count = 0; |
| 111 | hw->len = xfer->len; | 111 | hw->len = xfer->len; |
diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index dd72445ba2ea..50b2d88c8190 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c | |||
| @@ -554,7 +554,7 @@ static int davinci_spi_bufs(struct spi_device *spi, struct spi_transfer *t) | |||
| 554 | clear_io_bits(dspi->base + SPIGCR1, SPIGCR1_POWERDOWN_MASK); | 554 | clear_io_bits(dspi->base + SPIGCR1, SPIGCR1_POWERDOWN_MASK); |
| 555 | set_io_bits(dspi->base + SPIGCR1, SPIGCR1_SPIENA_MASK); | 555 | set_io_bits(dspi->base + SPIGCR1, SPIGCR1_SPIENA_MASK); |
| 556 | 556 | ||
| 557 | INIT_COMPLETION(dspi->done); | 557 | reinit_completion(&dspi->done); |
| 558 | 558 | ||
| 559 | if (spicfg->io_type == SPI_IO_TYPE_INTR) | 559 | if (spicfg->io_type == SPI_IO_TYPE_INTR) |
| 560 | set_io_bits(dspi->base + SPIINT, SPIINT_MASKINT); | 560 | set_io_bits(dspi->base + SPIINT, SPIINT_MASKINT); |
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index 32200d4f8780..80d8f40f7e05 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c | |||
| @@ -232,7 +232,7 @@ static int fsl_espi_bufs(struct spi_device *spi, struct spi_transfer *t) | |||
| 232 | mpc8xxx_spi->tx = t->tx_buf; | 232 | mpc8xxx_spi->tx = t->tx_buf; |
| 233 | mpc8xxx_spi->rx = t->rx_buf; | 233 | mpc8xxx_spi->rx = t->rx_buf; |
| 234 | 234 | ||
| 235 | INIT_COMPLETION(mpc8xxx_spi->done); | 235 | reinit_completion(&mpc8xxx_spi->done); |
| 236 | 236 | ||
| 237 | /* Set SPCOM[CS] and SPCOM[TRANLEN] field */ | 237 | /* Set SPCOM[CS] and SPCOM[TRANLEN] field */ |
| 238 | if ((t->len - 1) > SPCOM_TRANLEN_MAX) { | 238 | if ((t->len - 1) > SPCOM_TRANLEN_MAX) { |
diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c index 2129fcd1c31b..119f7af94537 100644 --- a/drivers/spi/spi-fsl-spi.c +++ b/drivers/spi/spi-fsl-spi.c | |||
| @@ -339,7 +339,7 @@ static int fsl_spi_bufs(struct spi_device *spi, struct spi_transfer *t, | |||
| 339 | mpc8xxx_spi->tx = t->tx_buf; | 339 | mpc8xxx_spi->tx = t->tx_buf; |
| 340 | mpc8xxx_spi->rx = t->rx_buf; | 340 | mpc8xxx_spi->rx = t->rx_buf; |
| 341 | 341 | ||
| 342 | INIT_COMPLETION(mpc8xxx_spi->done); | 342 | reinit_completion(&mpc8xxx_spi->done); |
| 343 | 343 | ||
| 344 | if (mpc8xxx_spi->flags & SPI_CPM_MODE) | 344 | if (mpc8xxx_spi->flags & SPI_CPM_MODE) |
| 345 | ret = fsl_spi_cpm_bufs(mpc8xxx_spi, t, is_dma_mapped); | 345 | ret = fsl_spi_cpm_bufs(mpc8xxx_spi, t, is_dma_mapped); |
diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c index 58d5ee0e4443..9602bbd8d7ea 100644 --- a/drivers/spi/spi-mpc512x-psc.c +++ b/drivers/spi/spi-mpc512x-psc.c | |||
| @@ -167,7 +167,7 @@ static int mpc512x_psc_spi_transfer_rxtx(struct spi_device *spi, | |||
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | /* have the ISR trigger when the TX FIFO is empty */ | 169 | /* have the ISR trigger when the TX FIFO is empty */ |
| 170 | INIT_COMPLETION(mps->txisrdone); | 170 | reinit_completion(&mps->txisrdone); |
| 171 | out_be32(&fifo->txisr, MPC512x_PSC_FIFO_EMPTY); | 171 | out_be32(&fifo->txisr, MPC512x_PSC_FIFO_EMPTY); |
| 172 | out_be32(&fifo->tximr, MPC512x_PSC_FIFO_EMPTY); | 172 | out_be32(&fifo->tximr, MPC512x_PSC_FIFO_EMPTY); |
| 173 | wait_for_completion(&mps->txisrdone); | 173 | wait_for_completion(&mps->txisrdone); |
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index de333059a9a7..73afb56c08cc 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c | |||
| @@ -202,7 +202,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, | |||
| 202 | if (!dma_xfer) | 202 | if (!dma_xfer) |
| 203 | return -ENOMEM; | 203 | return -ENOMEM; |
| 204 | 204 | ||
| 205 | INIT_COMPLETION(spi->c); | 205 | reinit_completion(&spi->c); |
| 206 | 206 | ||
| 207 | /* Chip select was already programmed into CTRL0 */ | 207 | /* Chip select was already programmed into CTRL0 */ |
| 208 | ctrl0 = readl(ssp->base + HW_SSP_CTRL0); | 208 | ctrl0 = readl(ssp->base + HW_SSP_CTRL0); |
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 9e2020df9e0f..4c4b0a1219a7 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c | |||
| @@ -890,7 +890,7 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master, | |||
| 890 | unsigned long flags; | 890 | unsigned long flags; |
| 891 | int use_dma; | 891 | int use_dma; |
| 892 | 892 | ||
| 893 | INIT_COMPLETION(sdd->xfer_completion); | 893 | reinit_completion(&sdd->xfer_completion); |
| 894 | 894 | ||
| 895 | /* Only BPW and Speed may change across transfers */ | 895 | /* Only BPW and Speed may change across transfers */ |
| 896 | bpw = xfer->bits_per_word; | 896 | bpw = xfer->bits_per_word; |
diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c index 2a95435a6a11..c74298cf70e2 100644 --- a/drivers/spi/spi-sh-msiof.c +++ b/drivers/spi/spi-sh-msiof.c | |||
| @@ -465,7 +465,7 @@ static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p, | |||
| 465 | ret = ret ? ret : sh_msiof_modify_ctr_wait(p, 0, CTR_TXE); | 465 | ret = ret ? ret : sh_msiof_modify_ctr_wait(p, 0, CTR_TXE); |
| 466 | 466 | ||
| 467 | /* start by setting frame bit */ | 467 | /* start by setting frame bit */ |
| 468 | INIT_COMPLETION(p->done); | 468 | reinit_completion(&p->done); |
| 469 | ret = ret ? ret : sh_msiof_modify_ctr_wait(p, 0, CTR_TFSE); | 469 | ret = ret ? ret : sh_msiof_modify_ctr_wait(p, 0, CTR_TFSE); |
| 470 | if (ret) { | 470 | if (ret) { |
| 471 | dev_err(&p->pdev->dev, "failed to start hardware\n"); | 471 | dev_err(&p->pdev->dev, "failed to start hardware\n"); |
diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c index 592b4aff651f..ed5e501c4652 100644 --- a/drivers/spi/spi-sirf.c +++ b/drivers/spi/spi-sirf.c | |||
| @@ -305,8 +305,8 @@ static int spi_sirfsoc_transfer(struct spi_device *spi, struct spi_transfer *t) | |||
| 305 | sspi->tx = t->tx_buf ? t->tx_buf : sspi->dummypage; | 305 | sspi->tx = t->tx_buf ? t->tx_buf : sspi->dummypage; |
| 306 | sspi->rx = t->rx_buf ? t->rx_buf : sspi->dummypage; | 306 | sspi->rx = t->rx_buf ? t->rx_buf : sspi->dummypage; |
| 307 | sspi->left_tx_word = sspi->left_rx_word = t->len / sspi->word_width; | 307 | sspi->left_tx_word = sspi->left_rx_word = t->len / sspi->word_width; |
| 308 | INIT_COMPLETION(sspi->rx_done); | 308 | reinit_completion(&sspi->rx_done); |
| 309 | INIT_COMPLETION(sspi->tx_done); | 309 | reinit_completion(&sspi->tx_done); |
| 310 | 310 | ||
| 311 | writel(SIRFSOC_SPI_INT_MASK_ALL, sspi->base + SIRFSOC_SPI_INT_STATUS); | 311 | writel(SIRFSOC_SPI_INT_MASK_ALL, sspi->base + SIRFSOC_SPI_INT_STATUS); |
| 312 | 312 | ||
diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index 9146bb3c2489..aaecfb3ebf58 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c | |||
| @@ -451,7 +451,7 @@ static void tegra_spi_dma_complete(void *args) | |||
| 451 | 451 | ||
| 452 | static int tegra_spi_start_tx_dma(struct tegra_spi_data *tspi, int len) | 452 | static int tegra_spi_start_tx_dma(struct tegra_spi_data *tspi, int len) |
| 453 | { | 453 | { |
| 454 | INIT_COMPLETION(tspi->tx_dma_complete); | 454 | reinit_completion(&tspi->tx_dma_complete); |
| 455 | tspi->tx_dma_desc = dmaengine_prep_slave_single(tspi->tx_dma_chan, | 455 | tspi->tx_dma_desc = dmaengine_prep_slave_single(tspi->tx_dma_chan, |
| 456 | tspi->tx_dma_phys, len, DMA_MEM_TO_DEV, | 456 | tspi->tx_dma_phys, len, DMA_MEM_TO_DEV, |
| 457 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 457 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
| @@ -470,7 +470,7 @@ static int tegra_spi_start_tx_dma(struct tegra_spi_data *tspi, int len) | |||
| 470 | 470 | ||
| 471 | static int tegra_spi_start_rx_dma(struct tegra_spi_data *tspi, int len) | 471 | static int tegra_spi_start_rx_dma(struct tegra_spi_data *tspi, int len) |
| 472 | { | 472 | { |
| 473 | INIT_COMPLETION(tspi->rx_dma_complete); | 473 | reinit_completion(&tspi->rx_dma_complete); |
| 474 | tspi->rx_dma_desc = dmaengine_prep_slave_single(tspi->rx_dma_chan, | 474 | tspi->rx_dma_desc = dmaengine_prep_slave_single(tspi->rx_dma_chan, |
| 475 | tspi->rx_dma_phys, len, DMA_DEV_TO_MEM, | 475 | tspi->rx_dma_phys, len, DMA_DEV_TO_MEM, |
| 476 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 476 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
| @@ -844,7 +844,7 @@ static int tegra_spi_transfer_one_message(struct spi_master *master, | |||
| 844 | list_for_each_entry(xfer, &msg->transfers, transfer_list) { | 844 | list_for_each_entry(xfer, &msg->transfers, transfer_list) { |
| 845 | unsigned long cmd1; | 845 | unsigned long cmd1; |
| 846 | 846 | ||
| 847 | INIT_COMPLETION(tspi->xfer_completion); | 847 | reinit_completion(&tspi->xfer_completion); |
| 848 | 848 | ||
| 849 | cmd1 = tegra_spi_setup_transfer_one(spi, xfer, is_first_msg); | 849 | cmd1 = tegra_spi_setup_transfer_one(spi, xfer, is_first_msg); |
| 850 | 850 | ||
diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c index 79be8ce6a9d1..4dc8e8129459 100644 --- a/drivers/spi/spi-tegra20-sflash.c +++ b/drivers/spi/spi-tegra20-sflash.c | |||
| @@ -339,7 +339,7 @@ static int tegra_sflash_transfer_one_message(struct spi_master *master, | |||
| 339 | msg->actual_length = 0; | 339 | msg->actual_length = 0; |
| 340 | single_xfer = list_is_singular(&msg->transfers); | 340 | single_xfer = list_is_singular(&msg->transfers); |
| 341 | list_for_each_entry(xfer, &msg->transfers, transfer_list) { | 341 | list_for_each_entry(xfer, &msg->transfers, transfer_list) { |
| 342 | INIT_COMPLETION(tsd->xfer_completion); | 342 | reinit_completion(&tsd->xfer_completion); |
| 343 | ret = tegra_sflash_start_transfer_one(spi, xfer, | 343 | ret = tegra_sflash_start_transfer_one(spi, xfer, |
| 344 | is_first_msg, single_xfer); | 344 | is_first_msg, single_xfer); |
| 345 | if (ret < 0) { | 345 | if (ret < 0) { |
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index af0a67886ae8..e66715ba37ed 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c | |||
| @@ -462,7 +462,7 @@ static void tegra_slink_dma_complete(void *args) | |||
| 462 | 462 | ||
| 463 | static int tegra_slink_start_tx_dma(struct tegra_slink_data *tspi, int len) | 463 | static int tegra_slink_start_tx_dma(struct tegra_slink_data *tspi, int len) |
| 464 | { | 464 | { |
| 465 | INIT_COMPLETION(tspi->tx_dma_complete); | 465 | reinit_completion(&tspi->tx_dma_complete); |
| 466 | tspi->tx_dma_desc = dmaengine_prep_slave_single(tspi->tx_dma_chan, | 466 | tspi->tx_dma_desc = dmaengine_prep_slave_single(tspi->tx_dma_chan, |
| 467 | tspi->tx_dma_phys, len, DMA_MEM_TO_DEV, | 467 | tspi->tx_dma_phys, len, DMA_MEM_TO_DEV, |
| 468 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 468 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
| @@ -481,7 +481,7 @@ static int tegra_slink_start_tx_dma(struct tegra_slink_data *tspi, int len) | |||
| 481 | 481 | ||
| 482 | static int tegra_slink_start_rx_dma(struct tegra_slink_data *tspi, int len) | 482 | static int tegra_slink_start_rx_dma(struct tegra_slink_data *tspi, int len) |
| 483 | { | 483 | { |
| 484 | INIT_COMPLETION(tspi->rx_dma_complete); | 484 | reinit_completion(&tspi->rx_dma_complete); |
| 485 | tspi->rx_dma_desc = dmaengine_prep_slave_single(tspi->rx_dma_chan, | 485 | tspi->rx_dma_desc = dmaengine_prep_slave_single(tspi->rx_dma_chan, |
| 486 | tspi->rx_dma_phys, len, DMA_DEV_TO_MEM, | 486 | tspi->rx_dma_phys, len, DMA_DEV_TO_MEM, |
| 487 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 487 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
| @@ -836,7 +836,7 @@ static int tegra_slink_transfer_one(struct spi_master *master, | |||
| 836 | struct tegra_slink_data *tspi = spi_master_get_devdata(master); | 836 | struct tegra_slink_data *tspi = spi_master_get_devdata(master); |
| 837 | int ret; | 837 | int ret; |
| 838 | 838 | ||
| 839 | INIT_COMPLETION(tspi->xfer_completion); | 839 | reinit_completion(&tspi->xfer_completion); |
| 840 | ret = tegra_slink_start_transfer_one(spi, xfer); | 840 | ret = tegra_slink_start_transfer_one(spi, xfer); |
| 841 | if (ret < 0) { | 841 | if (ret < 0) { |
| 842 | dev_err(tspi->dev, | 842 | dev_err(tspi->dev, |
diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c index ec3a83f52ea2..6d4ce4615163 100644 --- a/drivers/spi/spi-xilinx.c +++ b/drivers/spi/spi-xilinx.c | |||
| @@ -258,7 +258,7 @@ static int xilinx_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t) | |||
| 258 | xspi->tx_ptr = t->tx_buf; | 258 | xspi->tx_ptr = t->tx_buf; |
| 259 | xspi->rx_ptr = t->rx_buf; | 259 | xspi->rx_ptr = t->rx_buf; |
| 260 | xspi->remaining_bytes = t->len; | 260 | xspi->remaining_bytes = t->len; |
| 261 | INIT_COMPLETION(xspi->done); | 261 | reinit_completion(&xspi->done); |
| 262 | 262 | ||
| 263 | 263 | ||
| 264 | /* Enable the transmit empty interrupt, which we use to determine | 264 | /* Enable the transmit empty interrupt, which we use to determine |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 927998aa5e71..8d85ddc46011 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
| @@ -571,7 +571,7 @@ static int spi_transfer_one_message(struct spi_master *master, | |||
| 571 | list_for_each_entry(xfer, &msg->transfers, transfer_list) { | 571 | list_for_each_entry(xfer, &msg->transfers, transfer_list) { |
| 572 | trace_spi_transfer_start(msg, xfer); | 572 | trace_spi_transfer_start(msg, xfer); |
| 573 | 573 | ||
| 574 | INIT_COMPLETION(master->xfer_completion); | 574 | reinit_completion(&master->xfer_completion); |
| 575 | 575 | ||
| 576 | ret = master->transfer_one(master, msg->spi, xfer); | 576 | ret = master->transfer_one(master, msg->spi, xfer); |
| 577 | if (ret < 0) { | 577 | if (ret < 0) { |
diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c index aeae76b77be5..e2dd7830b320 100644 --- a/drivers/staging/iio/adc/mxs-lradc.c +++ b/drivers/staging/iio/adc/mxs-lradc.c | |||
| @@ -783,7 +783,7 @@ static int mxs_lradc_read_raw(struct iio_dev *iio_dev, | |||
| 783 | if (!ret) | 783 | if (!ret) |
| 784 | return -EBUSY; | 784 | return -EBUSY; |
| 785 | 785 | ||
| 786 | INIT_COMPLETION(lradc->completion); | 786 | reinit_completion(&lradc->completion); |
| 787 | 787 | ||
| 788 | /* | 788 | /* |
| 789 | * No buffered operation in progress, map the channel and trigger it. | 789 | * No buffered operation in progress, map the channel and trigger it. |
diff --git a/drivers/staging/media/solo6x10/solo6x10-p2m.c b/drivers/staging/media/solo6x10/solo6x10-p2m.c index 333594189b81..7f2f2472655b 100644 --- a/drivers/staging/media/solo6x10/solo6x10-p2m.c +++ b/drivers/staging/media/solo6x10/solo6x10-p2m.c | |||
| @@ -87,7 +87,7 @@ int solo_p2m_dma_desc(struct solo_dev *solo_dev, | |||
| 87 | if (mutex_lock_interruptible(&p2m_dev->mutex)) | 87 | if (mutex_lock_interruptible(&p2m_dev->mutex)) |
| 88 | return -EINTR; | 88 | return -EINTR; |
| 89 | 89 | ||
| 90 | INIT_COMPLETION(p2m_dev->completion); | 90 | reinit_completion(&p2m_dev->completion); |
| 91 | p2m_dev->error = 0; | 91 | p2m_dev->error = 0; |
| 92 | 92 | ||
| 93 | if (desc_cnt > 1 && solo_dev->type != SOLO_DEV_6110 && desc_mode) { | 93 | if (desc_cnt > 1 && solo_dev->type != SOLO_DEV_6110 && desc_mode) { |
diff --git a/drivers/staging/tidspbridge/core/sync.c b/drivers/staging/tidspbridge/core/sync.c index 7bb550acaf4a..743ff09d82d2 100644 --- a/drivers/staging/tidspbridge/core/sync.c +++ b/drivers/staging/tidspbridge/core/sync.c | |||
| @@ -72,7 +72,7 @@ int sync_wait_on_multiple_events(struct sync_object **events, | |||
| 72 | spin_lock_bh(&sync_lock); | 72 | spin_lock_bh(&sync_lock); |
| 73 | for (i = 0; i < count; i++) { | 73 | for (i = 0; i < count; i++) { |
| 74 | if (completion_done(&events[i]->comp)) { | 74 | if (completion_done(&events[i]->comp)) { |
| 75 | INIT_COMPLETION(events[i]->comp); | 75 | reinit_completion(&events[i]->comp); |
| 76 | *index = i; | 76 | *index = i; |
| 77 | spin_unlock_bh(&sync_lock); | 77 | spin_unlock_bh(&sync_lock); |
| 78 | status = 0; | 78 | status = 0; |
| @@ -92,7 +92,7 @@ int sync_wait_on_multiple_events(struct sync_object **events, | |||
| 92 | spin_lock_bh(&sync_lock); | 92 | spin_lock_bh(&sync_lock); |
| 93 | for (i = 0; i < count; i++) { | 93 | for (i = 0; i < count; i++) { |
| 94 | if (completion_done(&events[i]->comp)) { | 94 | if (completion_done(&events[i]->comp)) { |
| 95 | INIT_COMPLETION(events[i]->comp); | 95 | reinit_completion(&events[i]->comp); |
| 96 | *index = i; | 96 | *index = i; |
| 97 | status = 0; | 97 | status = 0; |
| 98 | } | 98 | } |
diff --git a/drivers/staging/tidspbridge/include/dspbridge/sync.h b/drivers/staging/tidspbridge/include/dspbridge/sync.h index 58a0d5c5543d..fc19b9707087 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/sync.h +++ b/drivers/staging/tidspbridge/include/dspbridge/sync.h | |||
| @@ -59,7 +59,7 @@ static inline void sync_init_event(struct sync_object *event) | |||
| 59 | 59 | ||
| 60 | static inline void sync_reset_event(struct sync_object *event) | 60 | static inline void sync_reset_event(struct sync_object *event) |
| 61 | { | 61 | { |
| 62 | INIT_COMPLETION(event->comp); | 62 | reinit_completion(&event->comp); |
| 63 | event->multi_comp = NULL; | 63 | event->multi_comp = NULL; |
| 64 | } | 64 | } |
| 65 | 65 | ||
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c index 6d04eb48bfbc..1aa4a3fd0f1b 100644 --- a/drivers/staging/tidspbridge/rmgr/drv_interface.c +++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c | |||
| @@ -332,7 +332,7 @@ static void bridge_recover(struct work_struct *work) | |||
| 332 | struct dev_object *dev; | 332 | struct dev_object *dev; |
| 333 | struct cfg_devnode *dev_node; | 333 | struct cfg_devnode *dev_node; |
| 334 | if (atomic_read(&bridge_cref)) { | 334 | if (atomic_read(&bridge_cref)) { |
| 335 | INIT_COMPLETION(bridge_comp); | 335 | reinit_completion(&bridge_comp); |
| 336 | while (!wait_for_completion_timeout(&bridge_comp, | 336 | while (!wait_for_completion_timeout(&bridge_comp, |
| 337 | msecs_to_jiffies(REC_TIMEOUT))) | 337 | msecs_to_jiffies(REC_TIMEOUT))) |
| 338 | pr_info("%s:%d handle(s) still opened\n", | 338 | pr_info("%s:%d handle(s) still opened\n", |
| @@ -348,7 +348,7 @@ static void bridge_recover(struct work_struct *work) | |||
| 348 | 348 | ||
| 349 | void bridge_recover_schedule(void) | 349 | void bridge_recover_schedule(void) |
| 350 | { | 350 | { |
| 351 | INIT_COMPLETION(bridge_open_comp); | 351 | reinit_completion(&bridge_open_comp); |
| 352 | recover = true; | 352 | recover = true; |
| 353 | queue_work(bridge_rec_queue, &bridge_recovery_work); | 353 | queue_work(bridge_rec_queue, &bridge_recovery_work); |
| 354 | } | 354 | } |
| @@ -389,7 +389,7 @@ static int omap3_bridge_startup(struct platform_device *pdev) | |||
| 389 | #ifdef CONFIG_TIDSPBRIDGE_RECOVERY | 389 | #ifdef CONFIG_TIDSPBRIDGE_RECOVERY |
| 390 | bridge_rec_queue = create_workqueue("bridge_rec_queue"); | 390 | bridge_rec_queue = create_workqueue("bridge_rec_queue"); |
| 391 | INIT_WORK(&bridge_recovery_work, bridge_recover); | 391 | INIT_WORK(&bridge_recovery_work, bridge_recover); |
| 392 | INIT_COMPLETION(bridge_comp); | 392 | reinit_completion(&bridge_comp); |
| 393 | #endif | 393 | #endif |
| 394 | 394 | ||
| 395 | #ifdef CONFIG_PM | 395 | #ifdef CONFIG_PM |
diff --git a/drivers/tty/metag_da.c b/drivers/tty/metag_da.c index 0e888621f484..7332e2ca4615 100644 --- a/drivers/tty/metag_da.c +++ b/drivers/tty/metag_da.c | |||
| @@ -495,7 +495,7 @@ static int dashtty_write(struct tty_struct *tty, const unsigned char *buf, | |||
| 495 | count = dport->xmit_cnt; | 495 | count = dport->xmit_cnt; |
| 496 | /* xmit buffer no longer empty? */ | 496 | /* xmit buffer no longer empty? */ |
| 497 | if (count) | 497 | if (count) |
| 498 | INIT_COMPLETION(dport->xmit_empty); | 498 | reinit_completion(&dport->xmit_empty); |
| 499 | mutex_unlock(&dport->xmit_lock); | 499 | mutex_unlock(&dport->xmit_lock); |
| 500 | 500 | ||
| 501 | if (total) { | 501 | if (total) { |
diff --git a/drivers/usb/c67x00/c67x00-sched.c b/drivers/usb/c67x00/c67x00-sched.c index aa491627a45b..892cc96466eb 100644 --- a/drivers/usb/c67x00/c67x00-sched.c +++ b/drivers/usb/c67x00/c67x00-sched.c | |||
| @@ -344,7 +344,7 @@ void c67x00_endpoint_disable(struct usb_hcd *hcd, struct usb_host_endpoint *ep) | |||
| 344 | /* it could happen that we reinitialize this completion, while | 344 | /* it could happen that we reinitialize this completion, while |
| 345 | * somebody was waiting for that completion. The timeout and | 345 | * somebody was waiting for that completion. The timeout and |
| 346 | * while loop handle such cases, but this might be improved */ | 346 | * while loop handle such cases, but this might be improved */ |
| 347 | INIT_COMPLETION(c67x00->endpoint_disable); | 347 | reinit_completion(&c67x00->endpoint_disable); |
| 348 | c67x00_sched_kick(c67x00); | 348 | c67x00_sched_kick(c67x00); |
| 349 | wait_for_completion_timeout(&c67x00->endpoint_disable, 1 * HZ); | 349 | wait_for_completion_timeout(&c67x00->endpoint_disable, 1 * HZ); |
| 350 | 350 | ||
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index 44cf775a8627..774e8b89cdb5 100644 --- a/drivers/usb/gadget/f_fs.c +++ b/drivers/usb/gadget/f_fs.c | |||
| @@ -373,7 +373,7 @@ static int __ffs_ep0_queue_wait(struct ffs_data *ffs, char *data, size_t len) | |||
| 373 | if (req->buf == NULL) | 373 | if (req->buf == NULL) |
| 374 | req->buf = (void *)0xDEADBABE; | 374 | req->buf = (void *)0xDEADBABE; |
| 375 | 375 | ||
| 376 | INIT_COMPLETION(ffs->ep0req_completion); | 376 | reinit_completion(&ffs->ep0req_completion); |
| 377 | 377 | ||
| 378 | ret = usb_ep_queue(ffs->gadget->ep0, req, GFP_ATOMIC); | 378 | ret = usb_ep_queue(ffs->gadget->ep0, req, GFP_ATOMIC); |
| 379 | if (unlikely(ret < 0)) | 379 | if (unlikely(ret < 0)) |
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 84657e07dc5d..439c951f261b 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c | |||
| @@ -455,7 +455,7 @@ static int parport_prologue(struct parport *pp) | |||
| 455 | return -1; | 455 | return -1; |
| 456 | } | 456 | } |
| 457 | mos_parport->msg_pending = true; /* synch usb call pending */ | 457 | mos_parport->msg_pending = true; /* synch usb call pending */ |
| 458 | INIT_COMPLETION(mos_parport->syncmsg_compl); | 458 | reinit_completion(&mos_parport->syncmsg_compl); |
| 459 | spin_unlock(&release_lock); | 459 | spin_unlock(&release_lock); |
| 460 | 460 | ||
| 461 | mutex_lock(&mos_parport->serial->disc_mutex); | 461 | mutex_lock(&mos_parport->serial->disc_mutex); |
diff --git a/drivers/video/exynos/exynos_mipi_dsi_common.c b/drivers/video/exynos/exynos_mipi_dsi_common.c index 7eed957b6014..85edabfdef5a 100644 --- a/drivers/video/exynos/exynos_mipi_dsi_common.c +++ b/drivers/video/exynos/exynos_mipi_dsi_common.c | |||
| @@ -220,7 +220,7 @@ int exynos_mipi_dsi_wr_data(struct mipi_dsim_device *dsim, unsigned int data_id, | |||
| 220 | case MIPI_DSI_DCS_LONG_WRITE: | 220 | case MIPI_DSI_DCS_LONG_WRITE: |
| 221 | { | 221 | { |
| 222 | unsigned int size, payload = 0; | 222 | unsigned int size, payload = 0; |
| 223 | INIT_COMPLETION(dsim_wr_comp); | 223 | reinit_completion(&dsim_wr_comp); |
| 224 | 224 | ||
| 225 | size = data_size * 4; | 225 | size = data_size * 4; |
| 226 | 226 | ||
| @@ -356,7 +356,7 @@ int exynos_mipi_dsi_rd_data(struct mipi_dsim_device *dsim, unsigned int data_id, | |||
| 356 | msleep(20); | 356 | msleep(20); |
| 357 | 357 | ||
| 358 | mutex_lock(&dsim->lock); | 358 | mutex_lock(&dsim->lock); |
| 359 | INIT_COMPLETION(dsim_rd_comp); | 359 | reinit_completion(&dsim_rd_comp); |
| 360 | exynos_mipi_dsi_rd_tx_header(dsim, | 360 | exynos_mipi_dsi_rd_tx_header(dsim, |
| 361 | MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE, req_size); | 361 | MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE, req_size); |
| 362 | 362 | ||
diff --git a/drivers/video/omap2/displays-new/encoder-tpd12s015.c b/drivers/video/omap2/displays-new/encoder-tpd12s015.c index 798ef200b055..d5c936cb217f 100644 --- a/drivers/video/omap2/displays-new/encoder-tpd12s015.c +++ b/drivers/video/omap2/displays-new/encoder-tpd12s015.c | |||
| @@ -69,7 +69,7 @@ static int tpd_connect(struct omap_dss_device *dssdev, | |||
| 69 | dst->src = dssdev; | 69 | dst->src = dssdev; |
| 70 | dssdev->dst = dst; | 70 | dssdev->dst = dst; |
| 71 | 71 | ||
| 72 | INIT_COMPLETION(ddata->hpd_completion); | 72 | reinit_completion(&ddata->hpd_completion); |
| 73 | 73 | ||
| 74 | gpio_set_value_cansleep(ddata->ct_cp_hpd_gpio, 1); | 74 | gpio_set_value_cansleep(ddata->ct_cp_hpd_gpio, 1); |
| 75 | /* DC-DC converter needs at max 300us to get to 90% of 5V */ | 75 | /* DC-DC converter needs at max 300us to get to 90% of 5V */ |
