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: 10097739 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 5F42660329 for ; Thu, 7 Dec 2017 06:43:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 526E62922A for ; Thu, 7 Dec 2017 06:43:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46C5229FA8; Thu, 7 Dec 2017 06:43:18 +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 3B8D02922A for ; Thu, 7 Dec 2017 06:43:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750817AbdLGGnQ (ORCPT ); Thu, 7 Dec 2017 01:43:16 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35680 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750781AbdLGGnP (ORCPT ); Thu, 7 Dec 2017 01:43:15 -0500 Received: by mail-wr0-f193.google.com with SMTP id g53so6279902wra.2; Wed, 06 Dec 2017 22:43:14 -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=lGYDmz42SqVbjh+eM1FvOTQ0jnL4OLawu3+VQiC8jSDOwQu4ABLXyJ54NZ4DYeH76J GPyqcXF0tuaedZTGNvO3Gq2sT09LqiQ1Z7IGtK1TgElvkxo1PEEP2/f4xMrK/6bPr2X/ 5sxP6pJqTBQbFL3MtjVlZ3iOa+AtOmrB2tLWwpw++jpd+14pdvZpjjFjyO3KRHKysdlM c/Cni6R4n8yfaWCOTbuROlSdIlC0J8ed6Q/jnLWdUtq6qAoB1mt+ox7jwGRkq7zT1jjv lKf/HDueMdTIFjMmlirkrJ5OXl+mnH61ZhX/6Dy74c78vntL5bHN9ZxyCNyRQrfM8/AX 4hNg== X-Gm-Message-State: AJaThX4jssfC6UlRXBj8dGaNDlWEZEiAwzAB/e4ZoGMbHGzNnzTwloAI oLVh2/UiYF0tk/RQWUCsznU= 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 Cc: Mark Brown , Chen-Yu Tsai , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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> 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 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; }