From patchwork Thu Dec 7 07:20:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takuo Koguchi X-Patchwork-Id: 10097777 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 A31B9602BF for ; Thu, 7 Dec 2017 07:34:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9401428538 for ; Thu, 7 Dec 2017 07:34:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 88BDB29657; Thu, 7 Dec 2017 07:34:54 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1EF1728538 for ; Thu, 7 Dec 2017 07:34:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: References:List-Owner; bh=lefzyrn7ZFAegtpy7jTQGj6eqJNf2oARnOClrKOPiII=; b=Mwx hGfmMzIrbTlyIsNFVd/q0FibypSY0qUGQN4oq2w43wHx4qf1eMtK8327HUm+grlcG+REkjcdqDw16 MjNnkkVoMGzr+chmft9CEQOqtWEnFKIE/avWi6C+AJRbThxZ4SiNuSfUKrQxk57eGDXKecQZKCUSu mcN6uoB8/k+5lB4bvQnA1APEdplKl20B200Mrx3F7zeoB8Wi3jUwrMoMtG3I20fIUYOKYKyVVhufz m7+LvfOOQjw9WcqYLEqMUFy/3KonlAqiJBz7TdqyvV2kgrYpmbZA74BELoEvoI3BebbG2f+mShAQO /3EOss69sgsjwo5qGNkymBtuYDmxl5g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eMqhp-00042w-EO; Thu, 07 Dec 2017 07:34:53 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eMqhQ-0003Ur-E0 for linux-arm-kernel@bombadil.infradead.org; Thu, 07 Dec 2017 07:34:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:References:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=X7ZP0UA9QABNxnXdx6ZF2JcmFKwhLpIhfRpsBx/aZFc=; b=FZDo+MZ3AceIwXXVndv4Zeduqk R+j8Tf6m+acL0Hvi2DV5wFfFxsmN3DgOoeQIyVcm4g/ZupI51lDJWGNSXyQi2xEKChM5HITzPckfs CA4DSaHFD51ildwii6J2Yrtz+dnqKQ8mNTC90Dv/sjp6Xm9eWl1+MKdds5vfeHbdvm6EXLQ84Aprc HXUjNGeYr1R7sN7OdbyURARyiETMt3/GbdLv/QiZNhcTpocoyIYbgdpXsGxPW22AX/dD4vnrnDyo+ qV2Xk7/hp3m5F3EzgXvbfDfGJpj6I8kKZkfg4BE/A4vd1Z5Yl/BNmRmmAzWvZcLYDba95b6y4QGCS TQQtvGCg==; Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eMpuE-0004wx-Oq for linux-arm-kernel@lists.infradead.org; Thu, 07 Dec 2017 06:43:39 +0000 Received: by mail-wr0-x244.google.com with SMTP id q9so6262073wre.7 for ; Wed, 06 Dec 2017 22:43:15 -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; bh=X7ZP0UA9QABNxnXdx6ZF2JcmFKwhLpIhfRpsBx/aZFc=; b=P5e9Pddk+6/20g7uT3PbxRbO0p5Cxdx3kFCVSZYxsBUh82obyEvVwGnLzRQvdQMODJ sY/jd1Ts40nBoJBA5TWB+YXTzuPo3umHL4AB630PLubxvsHeJHwfXLC4LySFCK2cGEDO 35M27WgpPCkB6Uqz/RzxQ2bKhZxD3RLv5AfKDNSzoD2LCgK7h91NSs1S0ZieLgdWtkW+ g4XBcHDfLHsIZre2BE9Hfk6nqEP/qEExELtHRiNnm1DRz+SHZp/5ZntbIp1nZflZN3rf cE6CdqIw8VKrKjhmYRud8tKVdpVQmH/NI5nXqxTy2YmXfjpZ51yjiY9WtrQq05svE/3s ZBYw== 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; bh=X7ZP0UA9QABNxnXdx6ZF2JcmFKwhLpIhfRpsBx/aZFc=; b=b/cSOnLWXacjrD3JFg19IivPRfYe0bG3+vhAiqFetArrDn0OhWkGfUi/vZ1iEm3sCa O6RDfmXsQIpQvS0Gztjr/9VWgdrluSOVIHWkBYLcnULHIkWUasr8cal7lVMRt6lso69c U5Zk5SJskmN+SVjkDVvgO/FRtXTvCLOg+zqNOh3rxMr08NxbUpspps5bSdDYp/CYFhR7 NOmdIRtPqhTc0nSkaxOTU2PGyvbfHX4LeML3yyfmGN6xbGqndWPdpaT9uh4VyxBUeoTs gL083vliSPSLO+RHgtQpahztnTlPGufybSuqEK4WOu5r+vpZse2Ld/jvji2b/WN+lkpB /IJA== X-Gm-Message-State: AJaThX5nYW1zF0CisrUdk1wnKo/4BAK2W9VSYxj9+dsQGc1AJY3oN++9 4pOiC7y/BkK9e4WIafcRQo4= X-Google-Smtp-Source: AGs4zMYixJSQ/OJTNcoBgFDq3AWJSyUf4o8cepKRsnmoEGZ5AlopmDZ85k+9kmU6F3jtPVti0eY6Sw== X-Received: by 10.223.164.81 with SMTP id e17mr21165754wra.16.1512628994157; Wed, 06 Dec 2017 22:43:14 -0800 (PST) Received: from koguchi-BX310UA.hotspot.internet-for-guests.com ([212.144.241.187]) by smtp.gmail.com with ESMTPSA id r14sm5745554wrb.43.2017.12.06.22.43.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Dec 2017 22:43:13 -0800 (PST) From: Takuo Koguchi X-Google-Original-From: Takuo Koguchi To: maxime.ripard@free-electrons.com, linux-kernel@vger.kernel.org, khoroshilov@ispras.ru, takuo.koguchi@gmail.com, takuo.koguchi.sw@hitachi.com Subject: [PATCH V3] spi: sun4i: disable clocks in the remove function Date: Thu, 7 Dec 2017 16:20:14 +0900 Message-Id: <1512631227-27334-1-git-send-email-takuo.koguchi.sw@hitachi.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20171206152005.yfbyylu6tbe5gnnv@flea.lan> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen-Yu Tsai , Mark Brown , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP mclk and hclk need to be disabled. Since pm_runtime_disable does not disable the clocks, use pm_runtime_force_suspend instead. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Takuo Koguchi Acked-by: Maxime Ripard --- V3: remove redundant pm_runtime_disable call. Compile test only, no runtime test done. drivers/spi/spi-sun4i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c index c5cd635..4141003 100644 --- a/drivers/spi/spi-sun4i.c +++ b/drivers/spi/spi-sun4i.c @@ -525,7 +525,7 @@ static int sun4i_spi_probe(struct platform_device *pdev) static int sun4i_spi_remove(struct platform_device *pdev) { - pm_runtime_disable(&pdev->dev); + pm_runtime_force_suspend(&pdev->dev); return 0; }