From patchwork Wed Dec 6 18:00:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takuo Koguchi X-Patchwork-Id: 10096629 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 95B9A60210 for ; Wed, 6 Dec 2017 17:22:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71CC628B22 for ; Wed, 6 Dec 2017 17:22:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6642729CB6; Wed, 6 Dec 2017 17:22:38 +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 E5A2A28B22 for ; Wed, 6 Dec 2017 17:22:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752162AbdLFRWh (ORCPT ); Wed, 6 Dec 2017 12:22:37 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:45946 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752134AbdLFRWg (ORCPT ); Wed, 6 Dec 2017 12:22:36 -0500 Received: by mail-wm0-f68.google.com with SMTP id 9so8519594wme.4; Wed, 06 Dec 2017 09:22:36 -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=vEFObHHNjpdodKCkgmOKHvroVIpnNG5C6eZ50tMTRSM=; b=dBG1Ys9b9+po5fLxXj9AePeRvhYc3F8jQh5VlZb2tV1tEUkpz8ggLn0lERKlCmr07Z u9JFNoqxsttjdkrhwr1EvFNoURFHEKKBaAsi54UxDDwnAj6m8n6Bvkwkam1jhUmW76MH A6FqMV8hHINpOpUxziqnb196QyWDDZY4ZiHiZNfMQSg8yedZjNboiMJ4R+UNVETyfhIT NNZuk+GgWYpNLf0ejuNGU23S1xaZq+8f45vfY2fYcdIIfxi+gkDhdpesGrx94bC6Z+O+ BzUkfeCU5fkshCRii5gMX9Jd09tf7I1CnFfPVHxlxO67D+u4xt8MMRtMycccmoGpHCpX mK4A== 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=vEFObHHNjpdodKCkgmOKHvroVIpnNG5C6eZ50tMTRSM=; b=EtlWMTZDShrkcW1WSlia9gWn/1sDS5q9U1r1HVtGYGr28NyORsDbGYn+B5mJn3e2fl fmVGik+gn9gAHxKWDj0fSFNWy74Ckql+Uo/jRrTDdPETyIQM2/qNTdFZXmQkyCLsKR7S 52xixFpFAEVPY3uGR2+7rfVeFKYyeCH7Hw004A15Y6qv69hYMCzHvWEOdNraZHtkChVU sNv+24XiAE2lH11JhR1oGNVMYg8ies3hK0b/PZA7e6x1AFEhbMoOC73BxJQZcJRDsIa7 m4iH1MGhzbcYIAzdof6oIlWI+dRRWGqvsRuKu8wfut6iLmBKSZFYwkmsH56J0JlhJc02 4OkQ== X-Gm-Message-State: AKGB3mKObqdS73/Fj2vYrFM5MXnEjNAK3wrKAr7Z83xYpWHPa7nf/fGk F3AqjwbugTJoy3VZ08BOz+H1Sy9n X-Google-Smtp-Source: AGs4zMbUwI2ukUIGy5uYBuNjKsLVx1qz5U6SQJORixFMUa/DHuvBkBWMEAqqMUlkXZB0JqXmthEiZQ== X-Received: by 10.28.196.194 with SMTP id u185mr14708667wmf.133.1512580955160; Wed, 06 Dec 2017 09:22:35 -0800 (PST) Received: from koguchi-BX310UA.hotspot.internet-for-guests.com ([212.144.241.187]) by smtp.gmail.com with ESMTPSA id 80sm3719643wmk.14.2017.12.06.09.22.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Dec 2017 09:22:33 -0800 (PST) From: Takuo Koguchi X-Google-Original-From: Takuo Koguchi To: linux-kernel@vger.kernel.org, khoroshilov@ispras.ru, takuo.koguchi@gmail.com Cc: Takuo Koguchi , Mark Brown , Maxime Ripard , Chen-Yu Tsai , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] spi: sun4i: disable clocks in the remove function Date: Thu, 7 Dec 2017 03:00:00 +0900 Message-Id: <1512583209-19398-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. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Takuo Koguchi --- V2: use pm_runtime_force_suspend to avoid unbalance disable call. Compile test only, no runtime test. drivers/spi/spi-sun4i.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c index c5cd635..ca733b2 100644 --- a/drivers/spi/spi-sun4i.c +++ b/drivers/spi/spi-sun4i.c @@ -525,6 +525,7 @@ static int sun4i_spi_probe(struct platform_device *pdev) static int sun4i_spi_remove(struct platform_device *pdev) { + pm_runtime_force_suspend(&pdev->dev); pm_runtime_disable(&pdev->dev); return 0;