From patchwork Tue Dec 12 10:10:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michele Dionisio X-Patchwork-Id: 10106579 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0FE396032B for ; Tue, 12 Dec 2017 10:11:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 030C829B71 for ; Tue, 12 Dec 2017 10:11:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC34D29B74; Tue, 12 Dec 2017 10:11:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87BFE29B71 for ; Tue, 12 Dec 2017 10:11:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751728AbdLLKLZ (ORCPT ); Tue, 12 Dec 2017 05:11:25 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:46160 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752498AbdLLKLQ (ORCPT ); Tue, 12 Dec 2017 05:11:16 -0500 Received: by mail-wm0-f67.google.com with SMTP id r78so19671759wme.5; Tue, 12 Dec 2017 02:11:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1yO7y+hkSBOLGHH1pfLCa+x4DGyLJcKwYvRJM2N6QAY=; b=fSoOVBEoavxNsatd55rB564Kyq5bLdip9KkzZEt71GFZyBOgJHDl6gKh0EZVU1SVGC zY541c88DSUB0AvuAoj4N/dWcxKls0lb7ftBjhQYOjlXAZN6ti1Q/DqwxT047RSZVUia CAXkHrL1BdtSuWkudRF252em/6vcWrATB6x2k4ZTyaQN40pnAyQfVVoWEWwMujUDR8AY tyFr/MPYiXNMi0IUqqJSWMl3PgvICA7WAGzTz1i98dQKBZ89WhDxABeejahZTvcZnibJ 5KdFE0H+5kgm0eRmV1i3lzopMdXmuXW/yu6EIGJV41Ry6Y67c/jdkkFHAPwblKkEJApN L2lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1yO7y+hkSBOLGHH1pfLCa+x4DGyLJcKwYvRJM2N6QAY=; b=jdUsKFgSMSCO/KEnLlotvJfasbYIPUjaMbyuAHRdKDOZoAluCnMF2a5tm2STKPXg+4 gwDDd4pakURkEPQjA/gfyCETSqaAkAPyuBCChOsl16NmspFB9QqEzO7qRks6PssMrn14 XTb5wgYPFoxeIG4fV0/JBCNBQBy0bU6yYfugVl7kdcqldbF38bkLv2vLdyhtD5sTOi9t ybUjZ0Zm9e41jkqVllJSXOzuSoZycDusFbrHtyV7SkeGtqV09IUmNsNzCCN//L+gft6K 2pXlLNXQwrYZbOX1/9Ikua6j0N4FUBlHi0CPaZwHYC6/LI1oke+9AGNMykPeFdsijsTx iCxQ== X-Gm-Message-State: AKGB3mJ/RszCndyKumzbUkUlQa1wdslYzwlS44Tlkku6BKVB+k+c+7aY EDrPAk8UclVecaoMjTtmV3M= X-Google-Smtp-Source: ACJfBouTIrKmV+tijC3ZLjgFuenUs4PQRVjd3EDifv75B6s/me4tmqgv+X5jodlKtlUy0eZBCppOWg== X-Received: by 10.28.216.212 with SMTP id p203mr1265384wmg.50.1513073475358; Tue, 12 Dec 2017 02:11:15 -0800 (PST) Received: from localhost.localdomain (net-93-146-228-90.cust.vodafonedsl.it. [93.146.228.90]) by smtp.gmail.com with ESMTPSA id w142sm1971295wme.3.2017.12.12.02.11.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Dec 2017 02:11:14 -0800 (PST) From: Michele Dionisio To: Mark Brown Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Michele Dionisio Subject: spi: davinci: Initialize dspi->done before any possible use of it Date: Tue, 12 Dec 2017 11:10:48 +0100 Message-Id: <20171212101048.28278-2-michele.dionisio@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171212101048.28278-1-michele.dionisio@gmail.com> References: <20171212101048.28278-1-michele.dionisio@gmail.com> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Michele Dionisio --- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 6ddb6ef1fda4..60d59b003aa4 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -945,6 +945,8 @@ static int davinci_spi_probe(struct platform_device *pdev) goto free_master; } + init_completion(&dspi->done); + ret = platform_get_irq(pdev, 0); if (ret == 0) ret = -EINVAL; @@ -1021,8 +1023,6 @@ static int davinci_spi_probe(struct platform_device *pdev) dspi->get_rx = davinci_spi_rx_buf_u8; dspi->get_tx = davinci_spi_tx_buf_u8; - init_completion(&dspi->done); - /* Reset In/OUT SPI module */ iowrite32(0, dspi->base + SPIGCR0); udelay(100);