Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp613992iog; Mon, 13 Jun 2022 09:10:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyti/NOhwswa47c3EAu7L5GWwcYdegxmq+os6Npl13XSQglLsK8RCrvepXQbgvgvw80Xry X-Received: by 2002:a05:6a00:338e:b0:51b:c452:4210 with SMTP id cm14-20020a056a00338e00b0051bc4524210mr275538pfb.69.1655136609724; Mon, 13 Jun 2022 09:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655136609; cv=none; d=google.com; s=arc-20160816; b=YxE9+ao1Eeaulp8tSnSu9GD4hKXuPQOjeCB0zkLe4upWEP0iRiQyMp1pXGbaktaANE 7FJvmJn049LYW8lZAiUsLxXZpSNS2oXRCkhl6xrlmtoOu/ZXWc3LF9N6uqheo7MZLXYH ynqxwLKSOYooAJHfq+qA9H64npCErNyEh+iVtyXONx3XZbozcU6iX6bJhsPRPRSpSR7/ pM+dSzHb5BPedD4+DRreOZtG1YErW8kMJJlj7Zpu0fAJhcqyRq//JMzvETboI3ZuhERy uh4QJlylnkAKFQnls22Rfv5yLBwZu3xJpGmRu4Au921zVYWD+qD1CiyDxQ3wy7kbGi8Z D2Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=THhjQCfA69Q4ayYEqm7fdHmzsWP/6Y2yWkYxFDhfMG4=; b=JQVQOyjcQcxiNNLxXdQEjI6KWrQa5q9Yrgi8jS/ntDvlnpH1hM3Sp0VBUEWKIC0+6a 1i9rv5V0hVACIP6oktlejLvwm4Vt0bImXX7/CXcBT/96UbsAxohhK5/njMA8Jtyl4KGO Dy/JDzzmZzwvTP/OiyJXRD69zb63GfaYPn/ugzzFV7F+MT4b5QCQLay1mzpn/9dFcT+I pRKyHFfV+Wx05czSe63PMWUV+Y/hQCaLuM/82ROn2xhKg8/Jk3ynq0CcyNjr+Dkuj88x /Zcf7RkrPnHEmvmvPZwHzD4FiC56uSssgxNgzjguVFm1ZdM54kgsn5EYM2NwNo4rtLjm Pajg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sPWr3QF4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h9-20020a170902f54900b001616a3550desi11582859plf.388.2022.06.13.09.09.55; Mon, 13 Jun 2022 09:10:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sPWr3QF4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357433AbiFMNCQ (ORCPT + 99 others); Mon, 13 Jun 2022 09:02:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358221AbiFMMzI (ORCPT ); Mon, 13 Jun 2022 08:55:08 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 595F726D1; Mon, 13 Jun 2022 04:14:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0CFB5B80EA7; Mon, 13 Jun 2022 11:14:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A698C3411E; Mon, 13 Jun 2022 11:14:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655118884; bh=Wt4ofVULaitmelzuri95m1cW0nIxSJWJMyO0McLtX+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sPWr3QF4h5xpnBi32xw5ChJYKGrc+EbQaaOLUKsrgeardyt62MQThvlk7dojc+cS+ JMCU7t0NzpjgaB50SQdwYwC655wtH/iUrew5JgXhLMyt0xmXYEUVVMmq5K8nDWg/R/ f+rFY+0xIHOVcXrpCmnA6k7azv+x2KLJBhCgtMug= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Romain Naour , Tony Lindgren , Sasha Levin Subject: [PATCH 5.15 063/247] bus: ti-sysc: Fix warnings for unbind for serial Date: Mon, 13 Jun 2022 12:09:25 +0200 Message-Id: <20220613094924.869324542@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094922.843438024@linuxfoundation.org> References: <20220613094922.843438024@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tony Lindgren [ Upstream commit c337125b8834f9719dfda0e40b25eaa266f1b8cf ] We can get "failed to disable" clock_unprepare warnings on unbind at least for the serial console device if the unbind is done before the device has been idled. As some devices are using deferred idle, we must check the status for pending idle work to idle the device. Fixes: 76f0f772e469 ("bus: ti-sysc: Improve handling for no-reset-on-init and no-idle-on-init") Cc: Romain Naour Reviewed-by: Romain Naour Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20220512053021.61650-1-tony@atomide.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/bus/ti-sysc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 00d46f3ae22f..e93912e56f28 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -3325,7 +3325,9 @@ static int sysc_remove(struct platform_device *pdev) struct sysc *ddata = platform_get_drvdata(pdev); int error; - cancel_delayed_work_sync(&ddata->idle_work); + /* Device can still be enabled, see deferred idle quirk in probe */ + if (cancel_delayed_work_sync(&ddata->idle_work)) + ti_sysc_idle(&ddata->idle_work.work); error = pm_runtime_resume_and_get(ddata->dev); if (error < 0) { -- 2.35.1