tree-wide: use reinit_completion instead of INIT_COMPLETION
authorWolfram Sang <wsa@the-dreams.de>
Thu, 14 Nov 2013 22:32:02 +0000 (14:32 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Nov 2013 00:32:21 +0000 (09:32 +0900)
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>
86 files changed:
arch/arm/mach-tegra/apbio.c
arch/powerpc/platforms/powermac/low_i2c.c
arch/powerpc/platforms/pseries/suspend.c
crypto/af_alg.c
crypto/tcrypt.c
crypto/testmgr.c
drivers/ata/libata-eh.c
drivers/base/power/main.c
drivers/block/amiflop.c
drivers/block/cciss.c
drivers/char/hw_random/timeriomem-rng.c
drivers/crypto/tegra-aes.c
drivers/firewire/core-transaction.c
drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c
drivers/hid/hid-wiimote.h
drivers/hwmon/jz4740-hwmon.c
drivers/i2c/busses/i2c-at91.c
drivers/i2c/busses/i2c-bcm2835.c
drivers/i2c/busses/i2c-davinci.c
drivers/i2c/busses/i2c-designware-core.c
drivers/i2c/busses/i2c-ismt.c
drivers/i2c/busses/i2c-mxs.c
drivers/i2c/busses/i2c-omap.c
drivers/i2c/busses/i2c-tegra.c
drivers/i2c/busses/i2c-wmt.c
drivers/iio/adc/ad_sigma_delta.c
drivers/iio/adc/nau7802.c
drivers/input/touchscreen/cyttsp_core.c
drivers/md/dm-crypt.c
drivers/media/platform/blackfin/bfin_capture.c
drivers/media/radio/radio-wl1273.c
drivers/media/radio/si470x/radio-si470x-common.c
drivers/media/rc/iguanair.c
drivers/memstick/core/memstick.c
drivers/memstick/host/r592.c
drivers/misc/mic/card/mic_virtio.c
drivers/misc/mic/host/mic_boot.c
drivers/misc/ti-st/st_kim.c
drivers/mtd/nand/mxc_nand.c
drivers/mtd/nand/r852.c
drivers/mtd/onenand/omap2.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
drivers/net/ieee802154/at86rf230.c
drivers/net/ieee802154/mrf24j40.c
drivers/net/wireless/ath/ath10k/htc.c
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/carl9170/usb.c
drivers/net/wireless/ath/wil6210/main.c
drivers/net/wireless/brcm80211/brcmfmac/p2p.c
drivers/net/wireless/zd1211rw/zd_usb.c
drivers/parport/parport_ip32.c
drivers/platform/x86/apple-gmux.c
drivers/power/ab8500_fg.c
drivers/power/jz4740-battery.c
drivers/rtc/rtc-hid-sensor-time.c
drivers/spi/spi-bcm2835.c
drivers/spi/spi-clps711x.c
drivers/spi/spi-davinci.c
drivers/spi/spi-fsl-espi.c
drivers/spi/spi-fsl-spi.c
drivers/spi/spi-mpc512x-psc.c
drivers/spi/spi-mxs.c
drivers/spi/spi-s3c64xx.c
drivers/spi/spi-sh-msiof.c
drivers/spi/spi-sirf.c
drivers/spi/spi-tegra114.c
drivers/spi/spi-tegra20-sflash.c
drivers/spi/spi-tegra20-slink.c
drivers/spi/spi-xilinx.c
drivers/spi/spi.c
drivers/staging/iio/adc/mxs-lradc.c
drivers/staging/media/solo6x10/solo6x10-p2m.c
drivers/staging/tidspbridge/core/sync.c
drivers/staging/tidspbridge/include/dspbridge/sync.h
drivers/staging/tidspbridge/rmgr/drv_interface.c
drivers/tty/metag_da.c
drivers/usb/c67x00/c67x00-sched.c
drivers/usb/gadget/f_fs.c
drivers/usb/serial/mos7720.c
drivers/video/exynos/exynos_mipi_dsi_common.c
drivers/video/omap2/displays-new/encoder-tpd12s015.c
fs/ecryptfs/crypto.c
fs/nfs/nfs4state.c
fs/ocfs2/dlmglue.c
sound/firewire/dice.c
sound/soc/samsung/ac97.c

index d7aa52ea6cfcb7fa92f98a703b5b17914585fa36..bc471973cf0424f3a040351d8ef2def5c458894d 100644 (file)
@@ -114,7 +114,7 @@ static int do_dma_transfer(unsigned long apb_add,
        dma_desc->callback = apb_dma_complete;
        dma_desc->callback_param = NULL;
 
-       INIT_COMPLETION(tegra_apb_wait);
+       reinit_completion(&tegra_apb_wait);
 
        dmaengine_submit(dma_desc);
        dma_async_issue_pending(tegra_apb_dma_chan);
index fc536f2971c0c02697aa5b4a8e885955d437a68e..7553b6a77c64a0ec5a310cfce08d36c914e605c1 100644 (file)
@@ -452,7 +452,7 @@ static int kw_i2c_xfer(struct pmac_i2c_bus *bus, u8 addrdir, int subsize,
         */
        if (use_irq) {
                /* Clear completion */
-               INIT_COMPLETION(host->complete);
+               reinit_completion(&host->complete);
                /* Ack stale interrupts */
                kw_write_reg(reg_isr, kw_read_reg(reg_isr));
                /* Arm timeout */
@@ -717,7 +717,7 @@ static int pmu_i2c_xfer(struct pmac_i2c_bus *bus, u8 addrdir, int subsize,
                        return -EINVAL;
                }
 
-               INIT_COMPLETION(comp);
+               reinit_completion(&comp);
                req->data[0] = PMU_I2C_CMD;
                req->reply[0] = 0xff;
                req->nbytes = sizeof(struct pmu_i2c_hdr) + 1;
@@ -748,7 +748,7 @@ static int pmu_i2c_xfer(struct pmac_i2c_bus *bus, u8 addrdir, int subsize,
 
                hdr->bus = PMU_I2C_BUS_STATUS;
 
-               INIT_COMPLETION(comp);
+               reinit_completion(&comp);
                req->data[0] = PMU_I2C_CMD;
                req->reply[0] = 0xff;
                req->nbytes = 2;
index 5f997e79d570f8fb704cf9ec79ef49cb538b3b28..16a255255d3003c64ce8d517fe90bf8b9109552b 100644 (file)
@@ -106,7 +106,7 @@ static int pseries_prepare_late(void)
        atomic_set(&suspend_data.done, 0);
        atomic_set(&suspend_data.error, 0);
        suspend_data.complete = &suspend_work;
-       INIT_COMPLETION(suspend_work);
+       reinit_completion(&suspend_work);
        return 0;
 }
 
index ac33d5f3077823af1e714039e2bc093763f8c2fb..966f893711b393a3f4a7f22252b0d1cf6eb8dc98 100644 (file)
@@ -434,7 +434,7 @@ int af_alg_wait_for_completion(int err, struct af_alg_completion *completion)
        case -EINPROGRESS:
        case -EBUSY:
                wait_for_completion(&completion->completion);
-               INIT_COMPLETION(completion->completion);
+               reinit_completion(&completion->completion);
                err = completion->err;
                break;
        };
index 25a5934f0e50a011f73db08a84735ae76b2a7f60..1ab8258fcf560735237a198b2037c102e229d20b 100644 (file)
@@ -493,7 +493,7 @@ static inline int do_one_ahash_op(struct ahash_request *req, int ret)
                ret = wait_for_completion_interruptible(&tr->completion);
                if (!ret)
                        ret = tr->err;
-               INIT_COMPLETION(tr->completion);
+               reinit_completion(&tr->completion);
        }
        return ret;
 }
@@ -721,7 +721,7 @@ static inline int do_one_acipher_op(struct ablkcipher_request *req, int ret)
                ret = wait_for_completion_interruptible(&tr->completion);
                if (!ret)
                        ret = tr->err;
-               INIT_COMPLETION(tr->completion);
+               reinit_completion(&tr->completion);
        }
 
        return ret;
index e091ef6e17912b24020bf0a1668f33602b770cf9..432afc03e7c3f9c1040ac54033950eb9e17c0727 100644 (file)
@@ -179,7 +179,7 @@ static int do_one_async_hash_op(struct ahash_request *req,
                ret = wait_for_completion_interruptible(&tr->completion);
                if (!ret)
                        ret = tr->err;
-               INIT_COMPLETION(tr->completion);
+               reinit_completion(&tr->completion);
        }
        return ret;
 }
@@ -336,7 +336,7 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
                                ret = wait_for_completion_interruptible(
                                        &tresult.completion);
                                if (!ret && !(ret = tresult.err)) {
-                                       INIT_COMPLETION(tresult.completion);
+                                       reinit_completion(&tresult.completion);
                                        break;
                                }
                                /* fall through */
@@ -543,7 +543,7 @@ static int __test_aead(struct crypto_aead *tfm, int enc,
                                ret = wait_for_completion_interruptible(
                                        &result.completion);
                                if (!ret && !(ret = result.err)) {
-                                       INIT_COMPLETION(result.completion);
+                                       reinit_completion(&result.completion);
                                        break;
                                }
                        case -EBADMSG:
@@ -697,7 +697,7 @@ static int __test_aead(struct crypto_aead *tfm, int enc,
                                ret = wait_for_completion_interruptible(
                                        &result.completion);
                                if (!ret && !(ret = result.err)) {
-                                       INIT_COMPLETION(result.completion);
+                                       reinit_completion(&result.completion);
                                        break;
                                }
                        case -EBADMSG:
@@ -983,7 +983,7 @@ static int __test_skcipher(struct crypto_ablkcipher *tfm, int enc,
                                ret = wait_for_completion_interruptible(
                                        &result.completion);
                                if (!ret && !((ret = result.err))) {
-                                       INIT_COMPLETION(result.completion);
+                                       reinit_completion(&result.completion);
                                        break;
                                }
                                /* fall through */
@@ -1086,7 +1086,7 @@ static int __test_skcipher(struct crypto_ablkcipher *tfm, int enc,
                                ret = wait_for_completion_interruptible(
                                        &result.completion);
                                if (!ret && !((ret = result.err))) {
-                                       INIT_COMPLETION(result.completion);
+                                       reinit_completion(&result.completion);
                                        break;
                                }
                                /* fall through */
index 77bbc8266883134fdfacb40d58fc991630499af8..92d7797223be12c41fb8cbcef92035781a779111 100644 (file)
@@ -3017,7 +3017,7 @@ static inline void ata_eh_pull_park_action(struct ata_port *ap)
         * ourselves at the beginning of each pass over the loop.
         *
         * Additionally, all write accesses to &ap->park_req_pending
-        * through INIT_COMPLETION() (see below) or complete_all()
+        * through reinit_completion() (see below) or complete_all()
         * (see ata_scsi_park_store()) are protected by the host lock.
         * As a result we have that park_req_pending.done is zero on
         * 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)
         */
 
        spin_lock_irqsave(ap->lock, flags);
-       INIT_COMPLETION(ap->park_req_pending);
+       reinit_completion(&ap->park_req_pending);
        ata_for_each_link(link, ap, EDGE) {
                ata_for_each_dev(dev, link, ALL) {
                        struct ata_eh_info *ehi = &link->eh_info;
index ee039afe90786510eb19e0a536beb30413b27a38..c12e9b9556be7d5d49d5d78c9de09eb39ce8a0f8 100644 (file)
@@ -757,7 +757,7 @@ void dpm_resume(pm_message_t state)
        async_error = 0;
 
        list_for_each_entry(dev, &dpm_suspended_list, power.entry) {
-               INIT_COMPLETION(dev->power.completion);
+               reinit_completion(&dev->power.completion);
                if (is_async(dev)) {
                        get_device(dev);
                        async_schedule(async_resume, dev);
@@ -1237,7 +1237,7 @@ static void async_suspend(void *data, async_cookie_t cookie)
 
 static int device_suspend(struct device *dev)
 {
-       INIT_COMPLETION(dev->power.completion);
+       reinit_completion(&dev->power.completion);
 
        if (pm_async_enabled && dev->power.async_suspend) {
                get_device(dev);
index 4ff85b8785ee180a5637f56a43ab87f61dcbe2c6..748dea4f34dc1e18b089557478a2b00221bd83c5 100644 (file)
@@ -343,7 +343,7 @@ static int fd_motor_on(int nr)
                unit[nr].motor = 1;
                fd_select(nr);
 
-               INIT_COMPLETION(motor_on_completion);
+               reinit_completion(&motor_on_completion);
                motor_on_timer.data = nr;
                mod_timer(&motor_on_timer, jiffies + HZ/2);
 
index 0c004ac05811de58b3a0cf49e7a3558010de7187..b35fc4f5237c3b44c7c51aaa0517e58a42a2ab81 100644 (file)
@@ -2808,7 +2808,7 @@ resend_cmd2:
                /* erase the old error information */
                memset(c->err_info, 0, sizeof(ErrorInfo_struct));
                return_status = IO_OK;
-               INIT_COMPLETION(wait);
+               reinit_completion(&wait);
                goto resend_cmd2;
        }
 
@@ -3669,7 +3669,7 @@ static int add_to_scan_list(struct ctlr_info *h)
                }
        }
        if (!found && !h->busy_scanning) {
-               INIT_COMPLETION(h->scan_wait);
+               reinit_completion(&h->scan_wait);
                list_add_tail(&h->scan_list, &scan_q);
                ret = 1;
        }
index d2120ba8f3f962444dee50ba69fbd57ec16a716a..73ce739f8e196c5ce154c6c186035d28124f4b1d 100644 (file)
@@ -79,7 +79,7 @@ static int timeriomem_rng_data_read(struct hwrng *rng, u32 *data)
        priv->expires = cur + delay;
        priv->present = 0;
 
-       INIT_COMPLETION(priv->completion);
+       reinit_completion(&priv->completion);
        mod_timer(&priv->timer, priv->expires);
 
        return 4;
index 2d58da972ae279f44b91f05dd472f6287c13f081..fa05e3c329bdd44a522a922a1d12e87a54393309 100644 (file)
@@ -268,7 +268,7 @@ static int aes_start_crypt(struct tegra_aes_dev *dd, u32 in_addr, u32 out_addr,
        aes_writel(dd, value, TEGRA_AES_SECURE_INPUT_SELECT);
 
        aes_writel(dd, out_addr, TEGRA_AES_SECURE_DEST_ADDR);
-       INIT_COMPLETION(dd->op_complete);
+       reinit_completion(&dd->op_complete);
 
        for (i = 0; i < AES_HW_MAX_ICQ_LENGTH - 1; i++) {
                do {
index e5af0e3a26ec9345a9a775e77ab76b78db94ba25..0e799516a2ab998ae80c28fb8662ee0384120f9f 100644 (file)
@@ -477,7 +477,7 @@ void fw_send_phy_config(struct fw_card *card,
        phy_config_packet.header[1] = data;
        phy_config_packet.header[2] = ~data;
        phy_config_packet.generation = generation;
-       INIT_COMPLETION(phy_config_done);
+       reinit_completion(&phy_config_done);
 
        card->driver->send_request(card, &phy_config_packet);
        wait_for_completion_timeout(&phy_config_done, timeout);
index 1eb86c79523ef8d5b34b436d4874282561722aac..e281070611480694006a6fe3e2d629524dbb422f 100644 (file)
@@ -99,7 +99,7 @@ static int xfer_read(struct i2c_adapter *adap, struct i2c_msg *pmsg)
        i2c_dev->status = I2C_STAT_INIT;
        i2c_dev->msg = pmsg;
        i2c_dev->buf_offset = 0;
-       INIT_COMPLETION(i2c_dev->complete);
+       reinit_completion(&i2c_dev->complete);
 
        /* Enable I2C transaction */
        temp = ((pmsg->len) << 20) | HI2C_EDID_READ | HI2C_ENABLE_TRANSACTION;
index 75db0c4000377f03bf262eb66a5492046aa012c8..cfa63b0825b056570e18c799e5f8b5c7ad77ed6c 100644 (file)
@@ -327,7 +327,7 @@ static inline void wiimote_cmd_acquire_noint(struct wiimote_data *wdata)
 static inline void wiimote_cmd_set(struct wiimote_data *wdata, int cmd,
                                                                __u32 opt)
 {
-       INIT_COMPLETION(wdata->state.ready);
+       reinit_completion(&wdata->state.ready);
        wdata->state.cmd = cmd;
        wdata->state.opt = opt;
 }
index e0d66b9590abd21d91440abe3fc7015dc21f4276..a183e488db78ba2531f349c688ff0283764f2578 100644 (file)
@@ -66,7 +66,7 @@ static ssize_t jz4740_hwmon_read_adcin(struct device *dev,
 
        mutex_lock(&hwmon->lock);
 
-       INIT_COMPLETION(*completion);
+       reinit_completion(completion);
 
        enable_irq(hwmon->irq);
        hwmon->cell->enable(to_platform_device(dev));
index fd059308affa2985e64142756c9176f356f0d744..8edba9de76df17ff4d0c973daafd89d4a1510f40 100644 (file)
@@ -371,7 +371,7 @@ static int at91_do_twi_transfer(struct at91_twi_dev *dev)
        dev_dbg(dev->dev, "transfer: %s %d bytes.\n",
                (dev->msg->flags & I2C_M_RD) ? "read" : "write", dev->buf_len);
 
-       INIT_COMPLETION(dev->cmd_complete);
+       reinit_completion(&dev->cmd_complete);
        dev->transfer_status = 0;
 
        if (!dev->buf_len) {
index ea4b08fc3353a99f75ac64eaf11bd3c1370d2913..d7e8600f31fbba8c4eaec181e9c1b277b7c7740d 100644 (file)
@@ -151,7 +151,7 @@ static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev,
 
        i2c_dev->msg_buf = msg->buf;
        i2c_dev->msg_buf_remaining = msg->len;
-       INIT_COMPLETION(i2c_dev->completion);
+       reinit_completion(&i2c_dev->completion);
 
        bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, BCM2835_I2C_C_CLEAR);
 
index 132369fad4e0fefe09e10dd88ade2eaf9a8b1972..960dec61c64ecc582472a149e37253a3f3e3b3bf 100644 (file)
@@ -323,7 +323,7 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop)
 
        davinci_i2c_write_reg(dev, DAVINCI_I2C_CNT_REG, dev->buf_len);
 
-       INIT_COMPLETION(dev->cmd_complete);
+       reinit_completion(&dev->cmd_complete);
        dev->cmd_err = 0;
 
        /* Take I2C out of reset and configure it as master */
index 5888feef1ac5a959b5f0471a3fb71b9a2b00bada..e89e3e2145e557898bd04766312a41811c3a85cf 100644 (file)
@@ -613,7 +613,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
        mutex_lock(&dev->lock);
        pm_runtime_get_sync(dev->dev);
 
-       INIT_COMPLETION(dev->cmd_complete);
+       reinit_completion(&dev->cmd_complete);
        dev->msgs = msgs;
        dev->msgs_num = num;
        dev->cmd_err = 0;
index 1672effbcebb23894b99deac27bb84d595fa28d2..0043ede234c2106455a592d0f654b40f4325627c 100644 (file)
@@ -541,7 +541,7 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr,
                desc->dptr_high = upper_32_bits(dma_addr);
        }
 
-       INIT_COMPLETION(priv->cmp);
+       reinit_completion(&priv->cmp);
 
        /* Add the descriptor */
        ismt_submit_desc(priv);
index b7c857774708d369931abb733b9675500b9138bd..3aedd86a64682dcb775a040210a980c6f5679e12 100644 (file)
@@ -505,7 +505,7 @@ static int mxs_i2c_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg,
                                return err;
                }
        } else {
-               INIT_COMPLETION(i2c->cmd_complete);
+               reinit_completion(&i2c->cmd_complete);
                ret = mxs_i2c_dma_setup_xfer(adap, msg, flags);
                if (ret)
                        return ret;
index 9967a6f9c2ffba2fe4521a8abf19b49e978110a4..a6a891d7970dd373414ca23ea7dd6924535dee38 100644 (file)
@@ -543,7 +543,7 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap,
        w |= OMAP_I2C_BUF_RXFIF_CLR | OMAP_I2C_BUF_TXFIF_CLR;
        omap_i2c_write_reg(dev, OMAP_I2C_BUF_REG, w);
 
-       INIT_COMPLETION(dev->cmd_complete);
+       reinit_completion(&dev->cmd_complete);
        dev->cmd_err = 0;
 
        w = OMAP_I2C_CON_EN | OMAP_I2C_CON_MST | OMAP_I2C_CON_STT;
index c457cb447c66bdf51911339853b561c273c06082..e661edee4d0cf0d92b7ab5e6899d1993bb264799 100644 (file)
@@ -544,7 +544,7 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev,
        i2c_dev->msg_buf_remaining = msg->len;
        i2c_dev->msg_err = I2C_ERR_NONE;
        i2c_dev->msg_read = (msg->flags & I2C_M_RD);
-       INIT_COMPLETION(i2c_dev->msg_complete);
+       reinit_completion(&i2c_dev->msg_complete);
 
        packet_header = (0 << PACKET_HEADER0_HEADER_SIZE_SHIFT) |
                        PACKET_HEADER0_PROTOCOL_I2C |
index c65da3d913a03d11ed13d62c17d7dffb3fb097bf..31395fa8121db6644a4379f2b578e419759380f5 100644 (file)
@@ -158,7 +158,7 @@ static int wmt_i2c_write(struct i2c_adapter *adap, struct i2c_msg *pmsg,
                writew(val, i2c_dev->base + REG_CR);
        }
 
-       INIT_COMPLETION(i2c_dev->complete);
+       reinit_completion(&i2c_dev->complete);
 
        if (i2c_dev->mode == I2C_MODE_STANDARD)
                tcr_val = TCR_STANDARD_MODE;
@@ -247,7 +247,7 @@ static int wmt_i2c_read(struct i2c_adapter *adap, struct i2c_msg *pmsg,
                writew(val, i2c_dev->base + REG_CR);
        }
 
-       INIT_COMPLETION(i2c_dev->complete);
+       reinit_completion(&i2c_dev->complete);
 
        if (i2c_dev->mode == I2C_MODE_STANDARD)
                tcr_val = TCR_STANDARD_MODE;
index e6fbd3e70981fca1a4d93d2c03891fcf1efde6c0..9a4e0e32a771c392dc153c19f9215ba7c3433d44 100644 (file)
@@ -188,7 +188,7 @@ static int ad_sd_calibrate(struct ad_sigma_delta *sigma_delta,
 
        spi_bus_lock(sigma_delta->spi->master);
        sigma_delta->bus_locked = true;
-       INIT_COMPLETION(sigma_delta->completion);
+       reinit_completion(&sigma_delta->completion);
 
        ret = ad_sigma_delta_set_mode(sigma_delta, mode);
        if (ret < 0)
@@ -259,7 +259,7 @@ int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev,
 
        spi_bus_lock(sigma_delta->spi->master);
        sigma_delta->bus_locked = true;
-       INIT_COMPLETION(sigma_delta->completion);
+       reinit_completion(&sigma_delta->completion);
 
        ad_sigma_delta_set_mode(sigma_delta, AD_SD_MODE_SINGLE);
 
@@ -343,7 +343,7 @@ static int ad_sd_buffer_postdisable(struct iio_dev *indio_dev)
 {
        struct ad_sigma_delta *sigma_delta = iio_device_get_drvdata(indio_dev);
 
-       INIT_COMPLETION(sigma_delta->completion);
+       reinit_completion(&sigma_delta->completion);
        wait_for_completion_timeout(&sigma_delta->completion, HZ);
 
        if (!sigma_delta->irq_dis) {
index 54c5babe67469bede8e70412470a24dd901e9000..e525aa6475c42b20cef6f3653da973620a2bccc9 100644 (file)
@@ -190,7 +190,7 @@ static int nau7802_read_irq(struct iio_dev *indio_dev,
        struct nau7802_state *st = iio_priv(indio_dev);
        int ret;
 
-       INIT_COMPLETION(st->value_ok);
+       reinit_completion(&st->value_ok);
        enable_irq(st->client->irq);
 
        nau7802_sync(st);
index d53e0b72a4078aadcb05ab43c319fce8b786da76..4204841cdc49743054f284cd4fcae8b7131255e8 100644 (file)
@@ -242,7 +242,7 @@ static int cyttsp_soft_reset(struct cyttsp *ts)
        int retval;
 
        /* wait for interrupt to set ready completion */
-       INIT_COMPLETION(ts->bl_ready);
+       reinit_completion(&ts->bl_ready);
        ts->state = CY_BL_STATE;
 
        enable_irq(ts->irq);
index 50ea7ed24dceb79b9813857f67ddafaeb01e7ce7..81b0fa66045204604a979fdc929e723f6c914a5c 100644 (file)
@@ -950,7 +950,7 @@ static int crypt_convert(struct crypt_config *cc,
                /* async */
                case -EBUSY:
                        wait_for_completion(&ctx->restart);
-                       INIT_COMPLETION(ctx->restart);
+                       reinit_completion(&ctx->restart);
                        /* fall through*/
                case -EINPROGRESS:
                        this_cc->req = NULL;
index 4c11059770903621296ccb286a650a10a9b027fe..281916591437fa8196cf9312a873c36135a7f915 100644 (file)
@@ -422,7 +422,7 @@ static int bcap_start_streaming(struct vb2_queue *vq, unsigned int count)
                return ret;
        }
 
-       INIT_COMPLETION(bcap_dev->comp);
+       reinit_completion(&bcap_dev->comp);
        bcap_dev->stop = false;
        return 0;
 }
index 97c2c18803efd7b6171f0b973396931f7c6ab7f7..9cf6731fb816b4fe2bb27c6ce06f37658995faf3 100644 (file)
@@ -375,7 +375,7 @@ static int wl1273_fm_set_tx_freq(struct wl1273_device *radio, unsigned int freq)
        if (r)
                return r;
 
-       INIT_COMPLETION(radio->busy);
+       reinit_completion(&radio->busy);
 
        /* wait for the FR IRQ */
        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)
        if (r)
                return r;
 
-       INIT_COMPLETION(radio->busy);
+       reinit_completion(&radio->busy);
 
        /* wait for the POWER_ENB IRQ */
        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)
                goto err;
        }
 
-       INIT_COMPLETION(radio->busy);
+       reinit_completion(&radio->busy);
 
        r = wait_for_completion_timeout(&radio->busy, msecs_to_jiffies(2000));
        if (!r) {
@@ -805,7 +805,7 @@ static int wl1273_fm_set_seek(struct wl1273_device *radio,
        if (level < SCHAR_MIN || level > SCHAR_MAX)
                return -EINVAL;
 
-       INIT_COMPLETION(radio->busy);
+       reinit_completion(&radio->busy);
        dev_dbg(radio->dev, "%s: BUSY\n", __func__);
 
        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,
        if (r)
                goto out;
 
-       INIT_COMPLETION(radio->busy);
+       reinit_completion(&radio->busy);
        dev_dbg(radio->dev, "%s: BUSY\n", __func__);
 
        r = core->write(core, WL1273_TUNER_MODE_SET, TUNER_MODE_AUTO_SEEK);
index 5c57e5b0f94920b8ed56fcd6431004463d8194f3..0bd250068285baabbe701929395d61b0f8d3bcc3 100644 (file)
@@ -218,7 +218,7 @@ static int si470x_set_chan(struct si470x_device *radio, unsigned short chan)
                goto done;
 
        /* wait till tune operation has completed */
-       INIT_COMPLETION(radio->completion);
+       reinit_completion(&radio->completion);
        retval = wait_for_completion_timeout(&radio->completion,
                        msecs_to_jiffies(tune_timeout));
        if (!retval)
@@ -341,7 +341,7 @@ static int si470x_set_seek(struct si470x_device *radio,
                return retval;
 
        /* wait till tune operation has completed */
-       INIT_COMPLETION(radio->completion);
+       reinit_completion(&radio->completion);
        retval = wait_for_completion_timeout(&radio->completion,
                        msecs_to_jiffies(seek_timeout));
        if (!retval)
index 19632b1c21908cb52e0c483f7a7339f647756e1e..b53626ba6f4954bf1bbe4e7caf954f2f597247d6 100644 (file)
@@ -207,7 +207,7 @@ static int iguanair_send(struct iguanair *ir, unsigned size)
 {
        int rc;
 
-       INIT_COMPLETION(ir->completion);
+       reinit_completion(&ir->completion);
 
        ir->urb_out->transfer_buffer_length = size;
        rc = usb_submit_urb(ir->urb_out, GFP_KERNEL);
index bbf4aea1627d389339526a5451b3ac1fc7e4815a..a0547dbf980645104d862fdc39e2ad740107ad15 100644 (file)
@@ -253,7 +253,7 @@ void memstick_new_req(struct memstick_host *host)
 {
        if (host->card) {
                host->retries = cmd_retries;
-               INIT_COMPLETION(host->card->mrq_complete);
+               reinit_completion(&host->card->mrq_complete);
                host->request(host);
        }
 }
index 1b6e91345222f7aa3e41bb4c7066fad833feae94..31727bf285d0de164d00024a5c34fe539403c94d 100644 (file)
@@ -290,7 +290,7 @@ static int r592_transfer_fifo_dma(struct r592_device *dev)
        dbg_verbose("doing dma transfer");
 
        dev->dma_error = 0;
-       INIT_COMPLETION(dev->dma_done);
+       reinit_completion(&dev->dma_done);
 
        /* TODO: hidden assumption about nenth beeing always 1 */
        sg_count = dma_map_sg(&dev->pci_dev->dev, &dev->req->sg, 1, is_write ?
index 914cc9b2caad76b1916524929921a87c270c47a5..8aa42e738acc6dde99a716535f8b27efcd9d0988 100644 (file)
@@ -493,7 +493,7 @@ static int mic_remove_device(struct mic_device_desc __iomem *d,
                        ioread8(&dc->config_change), ioread8(&d->type), mvdev);
 
                status = ioread8(&d->status);
-               INIT_COMPLETION(mvdev->reset_done);
+               reinit_completion(&mvdev->reset_done);
                unregister_virtio_device(&mvdev->vdev);
                mic_free_card_irq(mvdev->virtio_cookie, mvdev);
                if (status & VIRTIO_CONFIG_S_DRIVER_OK)
index b079c65eed6d2f77ca8fbd989180c3295c0b269d..7558d91864380ae849d90a24deee4e31985850eb 100644 (file)
@@ -38,7 +38,7 @@ static void mic_reset(struct mic_device *mdev)
 
 #define MIC_RESET_TO (45)
 
-       INIT_COMPLETION(mdev->reset_wait);
+       reinit_completion(&mdev->reset_wait);
        mdev->ops->reset_fw_ready(mdev);
        mdev->ops->reset(mdev);
 
index 83907c72059420973fbccc2512a8db8c553e6300..96853a09788a9a76b15da513007c359c0fd42e0b 100644 (file)
@@ -218,7 +218,7 @@ static long read_local_version(struct kim_data_s *kim_gdata, char *bts_scr_name)
 
        pr_debug("%s", __func__);
 
-       INIT_COMPLETION(kim_gdata->kim_rcvd);
+       reinit_completion(&kim_gdata->kim_rcvd);
        if (4 != st_int_write(kim_gdata->core_data, read_ver_cmd, 4)) {
                pr_err("kim: couldn't write 4 bytes");
                return -EIO;
@@ -229,7 +229,7 @@ static long read_local_version(struct kim_data_s *kim_gdata, char *bts_scr_name)
                pr_err(" waiting for ver info- timed out ");
                return -ETIMEDOUT;
        }
-       INIT_COMPLETION(kim_gdata->kim_rcvd);
+       reinit_completion(&kim_gdata->kim_rcvd);
        /* the positions 12 & 13 in the response buffer provide with the
         * chip, major & minor numbers
         */
@@ -362,7 +362,7 @@ static long download_firmware(struct kim_data_s *kim_gdata)
                        /* reinit completion before sending for the
                         * relevant wait
                         */
-                       INIT_COMPLETION(kim_gdata->kim_rcvd);
+                       reinit_completion(&kim_gdata->kim_rcvd);
 
                        /*
                         * Free space found in uart buffer, call st_int_write
@@ -398,7 +398,7 @@ static long download_firmware(struct kim_data_s *kim_gdata)
                                release_firmware(kim_gdata->fw_entry);
                                return -ETIMEDOUT;
                        }
-                       INIT_COMPLETION(kim_gdata->kim_rcvd);
+                       reinit_completion(&kim_gdata->kim_rcvd);
                        break;
                case ACTION_DELAY:      /* sleep */
                        pr_info("sleep command in scr");
@@ -474,7 +474,7 @@ long st_kim_start(void *kim_data)
                gpio_set_value(kim_gdata->nshutdown, GPIO_HIGH);
                mdelay(100);
                /* re-initialize the completion */
-               INIT_COMPLETION(kim_gdata->ldisc_installed);
+               reinit_completion(&kim_gdata->ldisc_installed);
                /* send notification to UIM */
                kim_gdata->ldisc_install = 1;
                pr_info("ldisc_install = 1");
@@ -525,7 +525,7 @@ long st_kim_stop(void *kim_data)
                kim_gdata->kim_pdev->dev.platform_data;
        struct tty_struct       *tty = kim_gdata->core_data->tty;
 
-       INIT_COMPLETION(kim_gdata->ldisc_installed);
+       reinit_completion(&kim_gdata->ldisc_installed);
 
        if (tty) {      /* can be called before ldisc is installed */
                /* Flush any pending characters in the driver and discipline. */
index 4edea7f4462f831c52abfa7a167e602f362902fd..9dfdb06c508b05439cd93a71ce5c30ef8558335e 100644 (file)
@@ -396,7 +396,7 @@ static void wait_op_done(struct mxc_nand_host *host, int useirq)
 
        if (useirq) {
                if (!host->devtype_data->check_int(host)) {
-                       INIT_COMPLETION(host->op_completion);
+                       reinit_completion(&host->op_completion);
                        irq_control(host, 1);
                        wait_for_completion(&host->op_completion);
                }
index 9dcf02d22aa8fed1a8e4006952f9d7ee27739c9e..325930db3f0481b28cec6bbeda63fc2e03052d78 100644 (file)
@@ -181,7 +181,7 @@ static void r852_do_dma(struct r852_device *dev, uint8_t *buf, int do_read)
        /* Set dma direction */
        dev->dma_dir = do_read;
        dev->dma_stage = 1;
-       INIT_COMPLETION(dev->dma_done);
+       reinit_completion(&dev->dma_done);
 
        dbg_verbose("doing dma %s ", do_read ? "read" : "write");
 
index 2362909d20c00f740c086049d410aa2450f81d3a..6547c84afc3a4bd6cde72302ddb1add10141b154 100644 (file)
@@ -159,7 +159,7 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
                                syscfg = read_reg(c, ONENAND_REG_SYS_CFG1);
                }
 
-               INIT_COMPLETION(c->irq_done);
+               reinit_completion(&c->irq_done);
                if (c->gpio_irq) {
                        result = gpio_get_value(c->gpio_irq);
                        if (result == -1) {
@@ -349,7 +349,7 @@ static int omap3_onenand_read_bufferram(struct mtd_info *mtd, int area,
        omap_set_dma_dest_params(c->dma_channel, 0, OMAP_DMA_AMODE_POST_INC,
                                 dma_dst, 0, 0);
 
-       INIT_COMPLETION(c->dma_done);
+       reinit_completion(&c->dma_done);
        omap_start_dma(c->dma_channel);
 
        timeout = jiffies + msecs_to_jiffies(20);
@@ -420,7 +420,7 @@ static int omap3_onenand_write_bufferram(struct mtd_info *mtd, int area,
        omap_set_dma_dest_params(c->dma_channel, 0, OMAP_DMA_AMODE_POST_INC,
                                 dma_dst, 0, 0);
 
-       INIT_COMPLETION(c->dma_done);
+       reinit_completion(&c->dma_done);
        omap_start_dma(c->dma_channel);
 
        timeout = jiffies + msecs_to_jiffies(20);
@@ -499,7 +499,7 @@ static int omap2_onenand_read_bufferram(struct mtd_info *mtd, int area,
        omap_set_dma_dest_params(c->dma_channel, 0, OMAP_DMA_AMODE_POST_INC,
                                 dma_dst, 0, 0);
 
-       INIT_COMPLETION(c->dma_done);
+       reinit_completion(&c->dma_done);
        omap_start_dma(c->dma_channel);
        wait_for_completion(&c->dma_done);
 
@@ -544,7 +544,7 @@ static int omap2_onenand_write_bufferram(struct mtd_info *mtd, int area,
        omap_set_dma_dest_params(c->dma_channel, 0, OMAP_DMA_AMODE_POST_INC,
                                 dma_dst, 0, 0);
 
-       INIT_COMPLETION(c->dma_done);
+       reinit_completion(&c->dma_done);
        omap_start_dma(c->dma_channel);
        wait_for_completion(&c->dma_done);
 
index 09810ddd11ec3231bb34c6e79e3235c24bbcc546..a01a6a74ee3ab9fb07a2ec0ae64bdcdd96def117 100644 (file)
@@ -3537,7 +3537,7 @@ int qlcnic_83xx_resume(struct qlcnic_adapter *adapter)
 
 void qlcnic_83xx_reinit_mbx_work(struct qlcnic_mailbox *mbx)
 {
-       INIT_COMPLETION(mbx->completion);
+       reinit_completion(&mbx->completion);
        set_bit(QLC_83XX_MBX_READY, &mbx->status);
 }
 
index 6f10b496472662c2550d943db16dac9dcb6dda4d..2cbe1c24999660a198ededf163584d9cc9e51bdd 100644 (file)
@@ -561,7 +561,7 @@ at86rf230_xmit(struct ieee802154_dev *dev, struct sk_buff *skb)
 
        spin_lock_irqsave(&lp->lock, flags);
        lp->is_tx = 1;
-       INIT_COMPLETION(lp->tx_complete);
+       reinit_completion(&lp->tx_complete);
        spin_unlock_irqrestore(&lp->lock, flags);
 
        rc = at86rf230_write_fbuf(lp, skb->data, skb->len);
index 0632d34905c73811456594cf0bf5e27f8710f5c7..c6e46d6e9f752040e2a6aa48588466556fbc09e9 100644 (file)
@@ -343,7 +343,7 @@ static int mrf24j40_tx(struct ieee802154_dev *dev, struct sk_buff *skb)
        if (ret)
                goto err;
 
-       INIT_COMPLETION(devrec->tx_complete);
+       reinit_completion(&devrec->tx_complete);
 
        /* Set TXNTRIG bit of TXNCON to send packet */
        ret = read_short_reg(devrec, REG_TXNCON, &val);
index 3118d7506734267c8fcca7e80ad9eeba9269fce1..edae50b52806f5382fc6ee7296ac810fda2eb9b5 100644 (file)
@@ -534,7 +534,7 @@ int ath10k_htc_wait_target(struct ath10k_htc *htc)
        u16 credit_count;
        u16 credit_size;
 
-       INIT_COMPLETION(htc->ctl_resp);
+       reinit_completion(&htc->ctl_resp);
 
        status = ath10k_hif_start(htc->ar);
        if (status) {
@@ -669,7 +669,7 @@ int ath10k_htc_connect_service(struct ath10k_htc *htc,
        req_msg->flags = __cpu_to_le16(flags);
        req_msg->service_id = __cpu_to_le16(conn_req->service_id);
 
-       INIT_COMPLETION(htc->ctl_resp);
+       reinit_completion(&htc->ctl_resp);
 
        status = ath10k_htc_send(htc, ATH10K_HTC_EP_0, skb);
        if (status) {
index 0b1cc516e778c912e77d341a90f4921e5227a258..97ac8c87cba232646f5f82617ea396b8c2573870 100644 (file)
@@ -92,7 +92,7 @@ static int ath10k_install_key(struct ath10k_vif *arvif,
 
        lockdep_assert_held(&ar->conf_mutex);
 
-       INIT_COMPLETION(ar->install_key_done);
+       reinit_completion(&ar->install_key_done);
 
        ret = ath10k_send_key(arvif, key, cmd, macaddr);
        if (ret)
@@ -438,7 +438,7 @@ static int ath10k_vdev_start(struct ath10k_vif *arvif)
 
        lockdep_assert_held(&ar->conf_mutex);
 
-       INIT_COMPLETION(ar->vdev_setup_done);
+       reinit_completion(&ar->vdev_setup_done);
 
        arg.vdev_id = arvif->vdev_id;
        arg.dtim_period = arvif->dtim_period;
@@ -491,7 +491,7 @@ static int ath10k_vdev_stop(struct ath10k_vif *arvif)
 
        lockdep_assert_held(&ar->conf_mutex);
 
-       INIT_COMPLETION(ar->vdev_setup_done);
+       reinit_completion(&ar->vdev_setup_done);
 
        ret = ath10k_wmi_vdev_stop(ar, arvif->vdev_id);
        if (ret) {
@@ -1666,7 +1666,7 @@ void ath10k_offchan_tx_work(struct work_struct *work)
                }
 
                spin_lock_bh(&ar->data_lock);
-               INIT_COMPLETION(ar->offchan_tx_completed);
+               reinit_completion(&ar->offchan_tx_completed);
                ar->offchan_tx_skb = skb;
                spin_unlock_bh(&ar->data_lock);
 
@@ -2476,8 +2476,8 @@ static int ath10k_hw_scan(struct ieee80211_hw *hw,
                goto exit;
        }
 
-       INIT_COMPLETION(ar->scan.started);
-       INIT_COMPLETION(ar->scan.completed);
+       reinit_completion(&ar->scan.started);
+       reinit_completion(&ar->scan.completed);
        ar->scan.in_progress = true;
        ar->scan.aborting = false;
        ar->scan.is_roc = false;
@@ -2832,9 +2832,9 @@ static int ath10k_remain_on_channel(struct ieee80211_hw *hw,
                goto exit;
        }
 
-       INIT_COMPLETION(ar->scan.started);
-       INIT_COMPLETION(ar->scan.completed);
-       INIT_COMPLETION(ar->scan.on_channel);
+       reinit_completion(&ar->scan.started);
+       reinit_completion(&ar->scan.completed);
+       reinit_completion(&ar->scan.on_channel);
        ar->scan.in_progress = true;
        ar->scan.aborting = false;
        ar->scan.is_roc = true;
index 307bc0ddff99091a1f224bb236013a1a90b5fa76..ca115f33746f228bc4f9007e0397b567f644e2a8 100644 (file)
@@ -773,7 +773,7 @@ void carl9170_usb_stop(struct ar9170 *ar)
        complete_all(&ar->cmd_wait);
 
        /* This is required to prevent an early completion on _start */
-       INIT_COMPLETION(ar->cmd_wait);
+       reinit_completion(&ar->cmd_wait);
 
        /*
         * Note:
index 0a2844c48a604a6fcf40c3f53e464f645f0d556d..fd30cddd58821f9c602a3bba0fcb91bbfc88aeef 100644 (file)
@@ -250,7 +250,7 @@ int wil_reset(struct wil6210_priv *wil)
 
        /* init after reset */
        wil->pending_connect_cid = -1;
-       INIT_COMPLETION(wil->wmi_ready);
+       reinit_completion(&wil->wmi_ready);
 
        /* TODO: release MAC reset */
        wil6210_enable_irq(wil);
index d7a974532909136c44eec23520e50d209db5df4b..5b5b952d47b194950c881eea53176df6ffe70af6 100644 (file)
@@ -1148,7 +1148,7 @@ static s32 brcmf_p2p_af_searching_channel(struct brcmf_p2p_info *p2p)
 
        pri_vif = p2p->bss_idx[P2PAPI_BSSCFG_PRIMARY].vif;
 
-       INIT_COMPLETION(afx_hdl->act_frm_scan);
+       reinit_completion(&afx_hdl->act_frm_scan);
        set_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL, &p2p->status);
        afx_hdl->is_active = true;
        afx_hdl->peer_chan = P2P_INVALID_CHANNEL;
@@ -1501,7 +1501,7 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p,
 
        brcmf_dbg(TRACE, "Enter\n");
 
-       INIT_COMPLETION(p2p->send_af_done);
+       reinit_completion(&p2p->send_af_done);
        clear_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED, &p2p->status);
        clear_bit(BRCMF_P2P_STATUS_ACTION_TX_NOACK, &p2p->status);
 
index 7ef0b4a181e130883a741c088fc9cb7668ddf231..84d94f572a463b294ed542476eb22e922eab81b9 100644 (file)
@@ -1619,7 +1619,7 @@ static void prepare_read_regs_int(struct zd_usb *usb,
        atomic_set(&intr->read_regs_enabled, 1);
        intr->read_regs.req = req;
        intr->read_regs.req_count = count;
-       INIT_COMPLETION(intr->read_regs.completion);
+       reinit_completion(&intr->read_regs.completion);
        spin_unlock_irq(&intr->lock);
 }
 
index d4716273651eb4354a7834304bdf812e69f9c647..c864f82bd37de9a369ed82b790676de29a4d59fb 100644 (file)
@@ -1331,7 +1331,7 @@ static unsigned int parport_ip32_fwp_wait_interrupt(struct parport *p)
                        break;
 
                /* Initialize mutex used to take interrupts into account */
-               INIT_COMPLETION(priv->irq_complete);
+               reinit_completion(&priv->irq_complete);
 
                /* Enable serviceIntr */
                parport_ip32_frob_econtrol(p, ECR_SERVINTR, 0);
@@ -1446,7 +1446,7 @@ static size_t parport_ip32_fifo_write_block_dma(struct parport *p,
        priv->irq_mode = PARPORT_IP32_IRQ_HERE;
 
        parport_ip32_dma_start(DMA_TO_DEVICE, (void *)buf, len);
-       INIT_COMPLETION(priv->irq_complete);
+       reinit_completion(&priv->irq_complete);
        parport_ip32_frob_econtrol(p, ECR_DMAEN | ECR_SERVINTR, ECR_DMAEN);
 
        nfault_timeout = min((unsigned long)physport->cad->timeout,
index 8eea2efbbb6dcfc23b692885693ce7f69e55437c..605a9be5512907238e520d080c55e4637afcbea0 100644 (file)
@@ -289,7 +289,7 @@ static int gmux_switchto(enum vga_switcheroo_client_id id)
 static int gmux_set_discrete_state(struct apple_gmux_data *gmux_data,
                                   enum vga_switcheroo_state state)
 {
-       INIT_COMPLETION(gmux_data->powerchange_done);
+       reinit_completion(&gmux_data->powerchange_done);
 
        if (state == VGA_SWITCHEROO_ON) {
                gmux_write8(gmux_data, GMUX_PORT_DISCRETE_POWER, 1);
index 754970717c317915ca3f9c5d8a2008e48bb79554..3cb4178e397c014695d7985383fd806b1ae8b79e 100644 (file)
@@ -574,8 +574,8 @@ int ab8500_fg_inst_curr_start(struct ab8500_fg *di)
        }
 
        /* Return and WFI */
-       INIT_COMPLETION(di->ab8500_fg_started);
-       INIT_COMPLETION(di->ab8500_fg_complete);
+       reinit_completion(&di->ab8500_fg_started);
+       reinit_completion(&di->ab8500_fg_complete);
        enable_irq(di->irq);
 
        /* Note: cc_lock is still locked */
index d9686aa9270a0b2732292e75b38c57ea32d1c064..6c8931d4ad62a554e3f185af3ada317ac61ffc7d 100644 (file)
@@ -73,7 +73,7 @@ static long jz_battery_read_voltage(struct jz_battery *battery)
 
        mutex_lock(&battery->lock);
 
-       INIT_COMPLETION(battery->read_completion);
+       reinit_completion(&battery->read_completion);
 
        enable_irq(battery->irq);
        battery->cell->enable(battery->pdev);
index a34e5cfd2ab5ac9864f20fffeff4a884382e3d12..965a9da70867fc95be934283fad8ff274ec21807 100644 (file)
@@ -209,7 +209,7 @@ static int hid_rtc_read_time(struct device *dev, struct rtc_time *tm)
                platform_get_drvdata(to_platform_device(dev));
        int ret;
 
-       INIT_COMPLETION(time_state->comp_last_time);
+       reinit_completion(&time_state->comp_last_time);
        /* get a report with all values through requesting one value */
        sensor_hub_input_attr_get_raw_value(time_state->common_attributes.hsdev,
                        HID_USAGE_SENSOR_TIME, hid_time_addresses[0],
index 4c332143a3100c52d916fc9887ffd11d96356892..3ed666fe840a0cdbaf1a2a2c6cd75670dd25fb48 100644 (file)
@@ -217,7 +217,7 @@ static int bcm2835_spi_start_transfer(struct spi_device *spi,
                cs |= spi->chip_select;
        }
 
-       INIT_COMPLETION(bs->done);
+       reinit_completion(&bs->done);
        bs->tx_buf = tfr->tx_buf;
        bs->rx_buf = tfr->rx_buf;
        bs->len = tfr->len;
index e2a5a426b2efc57038503ed7b64d00237e190b14..6f03d7e6435d82d367d568bd478af2aed9394a98 100644 (file)
@@ -105,7 +105,7 @@ static int spi_clps711x_transfer_one_message(struct spi_master *master,
 
                gpio_set_value(cs, !!(msg->spi->mode & SPI_CS_HIGH));
 
-               INIT_COMPLETION(hw->done);
+               reinit_completion(&hw->done);
 
                hw->count = 0;
                hw->len = xfer->len;
index dd72445ba2ea2d14f6afd7fb53c5317c1aee81af..50b2d88c81901c2b0b0ec1720f7e802ccf4924fb 100644 (file)
@@ -554,7 +554,7 @@ static int davinci_spi_bufs(struct spi_device *spi, struct spi_transfer *t)
        clear_io_bits(dspi->base + SPIGCR1, SPIGCR1_POWERDOWN_MASK);
        set_io_bits(dspi->base + SPIGCR1, SPIGCR1_SPIENA_MASK);
 
-       INIT_COMPLETION(dspi->done);
+       reinit_completion(&dspi->done);
 
        if (spicfg->io_type == SPI_IO_TYPE_INTR)
                set_io_bits(dspi->base + SPIINT, SPIINT_MASKINT);
index 32200d4f8780d4f6372e0ba0ce8388873a23d304..80d8f40f7e0553d600f1e36b018daa7fae275a64 100644 (file)
@@ -232,7 +232,7 @@ static int fsl_espi_bufs(struct spi_device *spi, struct spi_transfer *t)
        mpc8xxx_spi->tx = t->tx_buf;
        mpc8xxx_spi->rx = t->rx_buf;
 
-       INIT_COMPLETION(mpc8xxx_spi->done);
+       reinit_completion(&mpc8xxx_spi->done);
 
        /* Set SPCOM[CS] and SPCOM[TRANLEN] field */
        if ((t->len - 1) > SPCOM_TRANLEN_MAX) {
index 2129fcd1c31b6513319debe93978efd1b1c197ea..119f7af945374f43a7e1547efbb2f5aa1d9517b0 100644 (file)
@@ -339,7 +339,7 @@ static int fsl_spi_bufs(struct spi_device *spi, struct spi_transfer *t,
        mpc8xxx_spi->tx = t->tx_buf;
        mpc8xxx_spi->rx = t->rx_buf;
 
-       INIT_COMPLETION(mpc8xxx_spi->done);
+       reinit_completion(&mpc8xxx_spi->done);
 
        if (mpc8xxx_spi->flags & SPI_CPM_MODE)
                ret = fsl_spi_cpm_bufs(mpc8xxx_spi, t, is_dma_mapped);
index 58d5ee0e4443e24442cb4cbeb51b2e80ac637d3b..9602bbd8d7eac061fffb5543704fc9d68a48f135 100644 (file)
@@ -167,7 +167,7 @@ static int mpc512x_psc_spi_transfer_rxtx(struct spi_device *spi,
                        }
 
                        /* have the ISR trigger when the TX FIFO is empty */
-                       INIT_COMPLETION(mps->txisrdone);
+                       reinit_completion(&mps->txisrdone);
                        out_be32(&fifo->txisr, MPC512x_PSC_FIFO_EMPTY);
                        out_be32(&fifo->tximr, MPC512x_PSC_FIFO_EMPTY);
                        wait_for_completion(&mps->txisrdone);
index de333059a9a7ec0f55c134f15161c55bd414648c..73afb56c08cc26826d468ad4aaacdce3a7e7043f 100644 (file)
@@ -202,7 +202,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi,
        if (!dma_xfer)
                return -ENOMEM;
 
-       INIT_COMPLETION(spi->c);
+       reinit_completion(&spi->c);
 
        /* Chip select was already programmed into CTRL0 */
        ctrl0 = readl(ssp->base + HW_SSP_CTRL0);
index 9e2020df9e0f7e5c473cf500b82c611d4625686f..4c4b0a1219a715322d331b23232f8e92e61f92dc 100644 (file)
@@ -890,7 +890,7 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master,
        unsigned long flags;
        int use_dma;
 
-       INIT_COMPLETION(sdd->xfer_completion);
+               reinit_completion(&sdd->xfer_completion);
 
        /* Only BPW and Speed may change across transfers */
        bpw = xfer->bits_per_word;
index 2a95435a6a11d1b554b9a82e8f04c19a39ed0872..c74298cf70e2406d8972f4fe75cc2fcd59a15864 100644 (file)
@@ -465,7 +465,7 @@ static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p,
        ret = ret ? ret : sh_msiof_modify_ctr_wait(p, 0, CTR_TXE);
 
        /* start by setting frame bit */
-       INIT_COMPLETION(p->done);
+       reinit_completion(&p->done);
        ret = ret ? ret : sh_msiof_modify_ctr_wait(p, 0, CTR_TFSE);
        if (ret) {
                dev_err(&p->pdev->dev, "failed to start hardware\n");
index 592b4aff651f674c39f5c136a7bab01f9b178898..ed5e501c465276b6d39318818fa5d668d2685668 100644 (file)
@@ -305,8 +305,8 @@ static int spi_sirfsoc_transfer(struct spi_device *spi, struct spi_transfer *t)
        sspi->tx = t->tx_buf ? t->tx_buf : sspi->dummypage;
        sspi->rx = t->rx_buf ? t->rx_buf : sspi->dummypage;
        sspi->left_tx_word = sspi->left_rx_word = t->len / sspi->word_width;
-       INIT_COMPLETION(sspi->rx_done);
-       INIT_COMPLETION(sspi->tx_done);
+       reinit_completion(&sspi->rx_done);
+       reinit_completion(&sspi->tx_done);
 
        writel(SIRFSOC_SPI_INT_MASK_ALL, sspi->base + SIRFSOC_SPI_INT_STATUS);
 
index 9146bb3c24895803904bf67281b38ce9bc9c8395..aaecfb3ebf580bd9f746458b26175da61f1bc994 100644 (file)
@@ -451,7 +451,7 @@ static void tegra_spi_dma_complete(void *args)
 
 static int tegra_spi_start_tx_dma(struct tegra_spi_data *tspi, int len)
 {
-       INIT_COMPLETION(tspi->tx_dma_complete);
+       reinit_completion(&tspi->tx_dma_complete);
        tspi->tx_dma_desc = dmaengine_prep_slave_single(tspi->tx_dma_chan,
                                tspi->tx_dma_phys, len, DMA_MEM_TO_DEV,
                                DMA_PREP_INTERRUPT |  DMA_CTRL_ACK);
@@ -470,7 +470,7 @@ static int tegra_spi_start_tx_dma(struct tegra_spi_data *tspi, int len)
 
 static int tegra_spi_start_rx_dma(struct tegra_spi_data *tspi, int len)
 {
-       INIT_COMPLETION(tspi->rx_dma_complete);
+       reinit_completion(&tspi->rx_dma_complete);
        tspi->rx_dma_desc = dmaengine_prep_slave_single(tspi->rx_dma_chan,
                                tspi->rx_dma_phys, len, DMA_DEV_TO_MEM,
                                DMA_PREP_INTERRUPT |  DMA_CTRL_ACK);
@@ -844,7 +844,7 @@ static int tegra_spi_transfer_one_message(struct spi_master *master,
        list_for_each_entry(xfer, &msg->transfers, transfer_list) {
                unsigned long cmd1;
 
-               INIT_COMPLETION(tspi->xfer_completion);
+               reinit_completion(&tspi->xfer_completion);
 
                cmd1 = tegra_spi_setup_transfer_one(spi, xfer, is_first_msg);
 
index 79be8ce6a9d11368389c97faa0047c8ab5b5d8e1..4dc8e8129459b3eaa4bb18744e33dcbd578b0da2 100644 (file)
@@ -339,7 +339,7 @@ static int tegra_sflash_transfer_one_message(struct spi_master *master,
        msg->actual_length = 0;
        single_xfer = list_is_singular(&msg->transfers);
        list_for_each_entry(xfer, &msg->transfers, transfer_list) {
-               INIT_COMPLETION(tsd->xfer_completion);
+               reinit_completion(&tsd->xfer_completion);
                ret = tegra_sflash_start_transfer_one(spi, xfer,
                                        is_first_msg, single_xfer);
                if (ret < 0) {
index af0a67886ae8bee523c469af2d89d49aca9c2ec5..e66715ba37ed680811d7a53eb08e1b66979994c7 100644 (file)
@@ -462,7 +462,7 @@ static void tegra_slink_dma_complete(void *args)
 
 static int tegra_slink_start_tx_dma(struct tegra_slink_data *tspi, int len)
 {
-       INIT_COMPLETION(tspi->tx_dma_complete);
+       reinit_completion(&tspi->tx_dma_complete);
        tspi->tx_dma_desc = dmaengine_prep_slave_single(tspi->tx_dma_chan,
                                tspi->tx_dma_phys, len, DMA_MEM_TO_DEV,
                                DMA_PREP_INTERRUPT |  DMA_CTRL_ACK);
@@ -481,7 +481,7 @@ static int tegra_slink_start_tx_dma(struct tegra_slink_data *tspi, int len)
 
 static int tegra_slink_start_rx_dma(struct tegra_slink_data *tspi, int len)
 {
-       INIT_COMPLETION(tspi->rx_dma_complete);
+       reinit_completion(&tspi->rx_dma_complete);
        tspi->rx_dma_desc = dmaengine_prep_slave_single(tspi->rx_dma_chan,
                                tspi->rx_dma_phys, len, DMA_DEV_TO_MEM,
                                DMA_PREP_INTERRUPT |  DMA_CTRL_ACK);
@@ -836,7 +836,7 @@ static int tegra_slink_transfer_one(struct spi_master *master,
        struct tegra_slink_data *tspi = spi_master_get_devdata(master);
        int ret;
 
-       INIT_COMPLETION(tspi->xfer_completion);
+       reinit_completion(&tspi->xfer_completion);
        ret = tegra_slink_start_transfer_one(spi, xfer);
        if (ret < 0) {
                dev_err(tspi->dev,
index ec3a83f52ea2faead4cb43ab9908c087004469e9..6d4ce4615163ddb8efbdfc798cec36341b6baa1b 100644 (file)
@@ -258,7 +258,7 @@ static int xilinx_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t)
        xspi->tx_ptr = t->tx_buf;
        xspi->rx_ptr = t->rx_buf;
        xspi->remaining_bytes = t->len;
-       INIT_COMPLETION(xspi->done);
+       reinit_completion(&xspi->done);
 
 
        /* Enable the transmit empty interrupt, which we use to determine
index 927998aa5e71e711177a3adbf7cfe94ed020a85b..8d85ddc4601173c14fd24ae6a5f7defe60b94102 100644 (file)
@@ -571,7 +571,7 @@ static int spi_transfer_one_message(struct spi_master *master,
        list_for_each_entry(xfer, &msg->transfers, transfer_list) {
                trace_spi_transfer_start(msg, xfer);
 
-               INIT_COMPLETION(master->xfer_completion);
+               reinit_completion(&master->xfer_completion);
 
                ret = master->transfer_one(master, msg->spi, xfer);
                if (ret < 0) {
index aeae76b77be5732eebd2756a8c07353f99d4be0c..e2dd7830b3204a58541a8ec7e8fed8c68ca93bbd 100644 (file)
@@ -783,7 +783,7 @@ static int mxs_lradc_read_raw(struct iio_dev *iio_dev,
        if (!ret)
                return -EBUSY;
 
-       INIT_COMPLETION(lradc->completion);
+       reinit_completion(&lradc->completion);
 
        /*
         * No buffered operation in progress, map the channel and trigger it.
index 333594189b81e74e8ac83141b55d2d8f8b8737c5..7f2f2472655bf8a0c96eed19d251410c0e53aaf9 100644 (file)
@@ -87,7 +87,7 @@ int solo_p2m_dma_desc(struct solo_dev *solo_dev,
        if (mutex_lock_interruptible(&p2m_dev->mutex))
                return -EINTR;
 
-       INIT_COMPLETION(p2m_dev->completion);
+       reinit_completion(&p2m_dev->completion);
        p2m_dev->error = 0;
 
        if (desc_cnt > 1 && solo_dev->type != SOLO_DEV_6110 && desc_mode) {
index 7bb550acaf4a88a4e3a37e6c07d3eaaa27907d38..743ff09d82d2de8a8f1596d80f23f7a19d794491 100644 (file)
@@ -72,7 +72,7 @@ int sync_wait_on_multiple_events(struct sync_object **events,
        spin_lock_bh(&sync_lock);
        for (i = 0; i < count; i++) {
                if (completion_done(&events[i]->comp)) {
-                       INIT_COMPLETION(events[i]->comp);
+                       reinit_completion(&events[i]->comp);
                        *index = i;
                        spin_unlock_bh(&sync_lock);
                        status = 0;
@@ -92,7 +92,7 @@ int sync_wait_on_multiple_events(struct sync_object **events,
        spin_lock_bh(&sync_lock);
        for (i = 0; i < count; i++) {
                if (completion_done(&events[i]->comp)) {
-                       INIT_COMPLETION(events[i]->comp);
+                       reinit_completion(&events[i]->comp);
                        *index = i;
                        status = 0;
                }
index 58a0d5c5543d1617c82a9968c9c479952675892a..fc19b970708783c7d10298c51ddfaec2b8855a4a 100644 (file)
@@ -59,7 +59,7 @@ static inline void sync_init_event(struct sync_object *event)
 
 static inline void sync_reset_event(struct sync_object *event)
 {
-       INIT_COMPLETION(event->comp);
+       reinit_completion(&event->comp);
        event->multi_comp = NULL;
 }
 
index 6d04eb48bfbce9362862d47e28b6d3d1a0b84be0..1aa4a3fd0f1ba3b023367974593897ba1077df18 100644 (file)
@@ -332,7 +332,7 @@ static void bridge_recover(struct work_struct *work)
        struct dev_object *dev;
        struct cfg_devnode *dev_node;
        if (atomic_read(&bridge_cref)) {
-               INIT_COMPLETION(bridge_comp);
+               reinit_completion(&bridge_comp);
                while (!wait_for_completion_timeout(&bridge_comp,
                                                msecs_to_jiffies(REC_TIMEOUT)))
                        pr_info("%s:%d handle(s) still opened\n",
@@ -348,7 +348,7 @@ static void bridge_recover(struct work_struct *work)
 
 void bridge_recover_schedule(void)
 {
-       INIT_COMPLETION(bridge_open_comp);
+       reinit_completion(&bridge_open_comp);
        recover = true;
        queue_work(bridge_rec_queue, &bridge_recovery_work);
 }
@@ -389,7 +389,7 @@ static int omap3_bridge_startup(struct platform_device *pdev)
 #ifdef CONFIG_TIDSPBRIDGE_RECOVERY
        bridge_rec_queue = create_workqueue("bridge_rec_queue");
        INIT_WORK(&bridge_recovery_work, bridge_recover);
-       INIT_COMPLETION(bridge_comp);
+       reinit_completion(&bridge_comp);
 #endif
 
 #ifdef CONFIG_PM
index 0e888621f48464256b0375614d950f1dab43a8e4..7332e2ca46151b112a81775f1b4680ad51ce3ea3 100644 (file)
@@ -495,7 +495,7 @@ static int dashtty_write(struct tty_struct *tty, const unsigned char *buf,
        count = dport->xmit_cnt;
        /* xmit buffer no longer empty? */
        if (count)
-               INIT_COMPLETION(dport->xmit_empty);
+               reinit_completion(&dport->xmit_empty);
        mutex_unlock(&dport->xmit_lock);
 
        if (total) {
index aa491627a45ba83b51a881e0f5b7226a26139933..892cc96466ebbf2d17d744eab9dd2684d7fca902 100644 (file)
@@ -344,7 +344,7 @@ void c67x00_endpoint_disable(struct usb_hcd *hcd, struct usb_host_endpoint *ep)
                /* it could happen that we reinitialize this completion, while
                 * somebody was waiting for that completion.  The timeout and
                 * while loop handle such cases, but this might be improved */
-               INIT_COMPLETION(c67x00->endpoint_disable);
+               reinit_completion(&c67x00->endpoint_disable);
                c67x00_sched_kick(c67x00);
                wait_for_completion_timeout(&c67x00->endpoint_disable, 1 * HZ);
 
index 44cf775a86271ccd95cdf9577c283fc899e70d6c..774e8b89cdb593bf951b5c82e97c169f921a6130 100644 (file)
@@ -373,7 +373,7 @@ static int __ffs_ep0_queue_wait(struct ffs_data *ffs, char *data, size_t len)
        if (req->buf == NULL)
                req->buf = (void *)0xDEADBABE;
 
-       INIT_COMPLETION(ffs->ep0req_completion);
+       reinit_completion(&ffs->ep0req_completion);
 
        ret = usb_ep_queue(ffs->gadget->ep0, req, GFP_ATOMIC);
        if (unlikely(ret < 0))
index 84657e07dc5d6b914bd88da4697ab2f8c8b22de1..439c951f261b2d492cb78696fe3ad603154406eb 100644 (file)
@@ -455,7 +455,7 @@ static int parport_prologue(struct parport *pp)
                return -1;
        }
        mos_parport->msg_pending = true;   /* synch usb call pending */
-       INIT_COMPLETION(mos_parport->syncmsg_compl);
+       reinit_completion(&mos_parport->syncmsg_compl);
        spin_unlock(&release_lock);
 
        mutex_lock(&mos_parport->serial->disc_mutex);
index 7eed957b6014eb09dc2262c47d28b813d21b21ed..85edabfdef5acb6e561ced3a0411bc0e44ad8bf9 100644 (file)
@@ -220,7 +220,7 @@ int exynos_mipi_dsi_wr_data(struct mipi_dsim_device *dsim, unsigned int data_id,
        case MIPI_DSI_DCS_LONG_WRITE:
        {
                unsigned int size, payload = 0;
-               INIT_COMPLETION(dsim_wr_comp);
+               reinit_completion(&dsim_wr_comp);
 
                size = data_size * 4;
 
@@ -356,7 +356,7 @@ int exynos_mipi_dsi_rd_data(struct mipi_dsim_device *dsim, unsigned int data_id,
        msleep(20);
 
        mutex_lock(&dsim->lock);
-       INIT_COMPLETION(dsim_rd_comp);
+       reinit_completion(&dsim_rd_comp);
        exynos_mipi_dsi_rd_tx_header(dsim,
                MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE, req_size);
 
index 798ef200b055590395ea1e05969b6a7b77c3aa1a..d5c936cb217fe78bc0f072a602f22c14b61e388f 100644 (file)
@@ -69,7 +69,7 @@ static int tpd_connect(struct omap_dss_device *dssdev,
        dst->src = dssdev;
        dssdev->dst = dst;
 
-       INIT_COMPLETION(ddata->hpd_completion);
+       reinit_completion(&ddata->hpd_completion);
 
        gpio_set_value_cansleep(ddata->ct_cp_hpd_gpio, 1);
        /* DC-DC converter needs at max 300us to get to 90% of 5V */
index 000eae2782b6e905aefa05980ef91c54b81a8274..2f6735dbf1a9ded47999ebc97590221b16eb6925 100644 (file)
@@ -392,7 +392,7 @@ static int crypt_scatterlist(struct ecryptfs_crypt_stat *crypt_stat,
 
                wait_for_completion(&ecr->completion);
                rc = ecr->rc;
-               INIT_COMPLETION(ecr->completion);
+               reinit_completion(&ecr->completion);
        }
 out:
        ablkcipher_request_free(req);
index c8e729deb4f711fc38349c2b883f29c7ecb6b407..74a7e12e10df472ee1752af9726220ee12ca4ac9 100644 (file)
@@ -244,7 +244,7 @@ static int nfs4_drain_slot_tbl(struct nfs4_slot_table *tbl)
        set_bit(NFS4_SLOT_TBL_DRAINING, &tbl->slot_tbl_state);
        spin_lock(&tbl->slot_tbl_lock);
        if (tbl->highest_used_slotid != NFS4_NO_SLOT) {
-               INIT_COMPLETION(tbl->complete);
+               reinit_completion(&tbl->complete);
                spin_unlock(&tbl->slot_tbl_lock);
                return wait_for_completion_interruptible(&tbl->complete);
        }
index 3a44a648dae7709b1cd5431c426cf3b9e057e54a..3407b2c62b21bbf51981584f6645520048a2a57a 100644 (file)
@@ -1304,7 +1304,7 @@ static int ocfs2_wait_for_mask(struct ocfs2_mask_waiter *mw)
 {
        wait_for_completion(&mw->mw_complete);
        /* Re-arm the completion in case we want to wait on it again */
-       INIT_COMPLETION(mw->mw_complete);
+       reinit_completion(&mw->mw_complete);
        return mw->mw_status;
 }
 
@@ -1355,7 +1355,7 @@ static int ocfs2_wait_for_mask_interruptible(struct ocfs2_mask_waiter *mw,
        else
                ret = mw->mw_status;
        /* Re-arm the completion in case we want to wait on it again */
-       INIT_COMPLETION(mw->mw_complete);
+       reinit_completion(&mw->mw_complete);
        return ret;
 }
 
index 6feee6614193a88d894c8f3e4f4942074523e4e6..57bcd31fcc123c38cd293cab40b52310734698a2 100644 (file)
@@ -543,7 +543,7 @@ static int dice_change_rate(struct dice *dice, unsigned int clock_rate)
        __be32 value;
        int err;
 
-       INIT_COMPLETION(dice->clock_accepted);
+       reinit_completion(&dice->clock_accepted);
 
        value = cpu_to_be32(clock_rate | CLOCK_SOURCE_ARX1);
        err = snd_fw_transaction(dice->unit, TCODE_WRITE_QUADLET_REQUEST,
index 2acf987844e8089704a4bf6d0ccde5ece2cc39e3..350ba23a9893484edb3d0585518b7048d568e875 100644 (file)
@@ -74,7 +74,7 @@ static void s3c_ac97_activate(struct snd_ac97 *ac97)
        if (stat == S3C_AC97_GLBSTAT_MAINSTATE_ACTIVE)
                return; /* Return if already active */
 
-       INIT_COMPLETION(s3c_ac97.done);
+       reinit_completion(&s3c_ac97.done);
 
        ac_glbctrl = readl(s3c_ac97.regs + S3C_AC97_GLBCTRL);
        ac_glbctrl = S3C_AC97_GLBCTRL_ACLINKON;
@@ -103,7 +103,7 @@ static unsigned short s3c_ac97_read(struct snd_ac97 *ac97,
 
        s3c_ac97_activate(ac97);
 
-       INIT_COMPLETION(s3c_ac97.done);
+       reinit_completion(&s3c_ac97.done);
 
        ac_codec_cmd = readl(s3c_ac97.regs + S3C_AC97_CODEC_CMD);
        ac_codec_cmd = S3C_AC97_CODEC_CMD_READ | AC_CMD_ADDR(reg);
@@ -140,7 +140,7 @@ static void s3c_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
 
        s3c_ac97_activate(ac97);
 
-       INIT_COMPLETION(s3c_ac97.done);
+       reinit_completion(&s3c_ac97.done);
 
        ac_codec_cmd = readl(s3c_ac97.regs + S3C_AC97_CODEC_CMD);
        ac_codec_cmd = AC_CMD_ADDR(reg) | AC_CMD_DATA(val);