From patchwork Thu Aug 24 10:40:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fei Shao X-Patchwork-Id: 13363982 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2141C6FA8F for ; Thu, 24 Aug 2023 10:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SNMFXK9UoxLVT45qpDnupuZU/FIKoSWeJNeYgirzK/0=; b=RUeJenqM2ibbPB IWXG2ZAuTJNR5Wd3Q8wH3ACxJJNhkmTsRcF/IbqwSbsUt4mpG9mFwzvrZpJOmEdA9XYNKwBQvYXNb cCkiCyRwKTGIHU90A9ODPXXKszzR5GLXMpqXkSIrhnD1qEyoO98EgVYWRb84PHInfB5AlUiFqO0iP wO7CQXDhiJUdnZEe8ya2t1s44CpZrSTEP+Nu9KSRf0QfbPtEcOWcnXoyvosAGkqY2Yj9hOb+NLBt1 vLZsPvaxxzI1fTBXI+BXouRHDQCEMtk5rM0z1uRzRTRoE+EP57FuSprx7UnGAkjur4cY0PE2GnDqN 8sy4TMpNJBl5rc3HywLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qZ7mx-002toP-1w; Thu, 24 Aug 2023 10:42:07 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qZ7mp-002tkI-2N for linux-arm-kernel@lists.infradead.org; Thu, 24 Aug 2023 10:42:02 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1bdb7b0c8afso41201635ad.3 for ; Thu, 24 Aug 2023 03:41:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1692873719; x=1693478519; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=11OMDqVoPHj88ZJ2JJBotRCN1O2u/mKSOXzwJ5mYolk=; b=TLRyytcCKZ5pvPqDgKQrJygb5/3SMgG9GDYdNw6z2HnL81D20CEDAFstplAijFbP4k bxJu/nxU4QI51JcqgWn43/7+qNZd/RWjEAJgvnKSJyZDLYhX0C6TLk9CFt4gHcJiokv8 /EnejQ+0+FfhONT74+rGUVytbINgjc8WfJPD0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692873719; x=1693478519; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=11OMDqVoPHj88ZJ2JJBotRCN1O2u/mKSOXzwJ5mYolk=; b=BP1Y956J3VRnOIrfpDOS5QcR+6T3SVKWbUR/FBLuOxmkOjGz3pDx6d1avdjLRkvvMI WGZHDbqFmYRcwNT+GbVD2GcsYkHRIwFxhZZ1pjVszpsTPkyqXfddurZnlGhqRs8p3XO+ N4Avma/BKaMsQFhMNfhBWLkgpuAezskfY/S6JpCrjaRP5ILZjiNylImn2PSAESvfKUFp Tt9y84APGUfyFEVe1n3nhJGpNBqk+ioNHZRdFRPK/+GMvnQ6vu8IOTj1WctV4vpjhhB0 Yw7lziOxhMyG5ds8FhRT9FRZ2tP9DUkqM0wLvmmpi4VN1gNx5v602suR2LUKfFfFwMWO gp9A== X-Gm-Message-State: AOJu0YxELUgY/BNztt7GZ3RHiyo3GyzsrS6457qr6UH4DCAXUV1RsAjs c+A3GjBBBQczc5lWpQAX7TzqUA== X-Google-Smtp-Source: AGHT+IEjXqoNHLwL9K3+kgYdZSexg1MmfuqiBw8xGh1DzEWiwriMgsY3wjC8rJhHLSB9/+0if9QOXA== X-Received: by 2002:a17:903:1c4:b0:1bb:b91b:2b3c with SMTP id e4-20020a17090301c400b001bbb91b2b3cmr14732522plh.34.1692873719205; Thu, 24 Aug 2023 03:41:59 -0700 (PDT) Received: from fshao-p620.tpe.corp.google.com ([2401:fa00:1:10:ed6d:42e3:a23:8316]) by smtp.gmail.com with ESMTPSA id q2-20020a170902dac200b001b5247cac3dsm12524645plx.110.2023.08.24.03.41.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 03:41:58 -0700 (PDT) From: Fei Shao To: Stephen Boyd , Chen-Yu Tsai Cc: linux-mediatek@lists.infradead.org, Fei Shao , AngeloGioacchino Del Regno , Matthias Brugger , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] spmi: mtk-pmif: Reorder driver remove sequence Date: Thu, 24 Aug 2023 18:40:10 +0800 Message-ID: <20230824104101.4083400-4-fshao@chromium.org> X-Mailer: git-send-email 2.42.0.rc1.204.g551eb34607-goog In-Reply-To: <20230824104101.4083400-1-fshao@chromium.org> References: <20230824104101.4083400-1-fshao@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230824_034159_779075_3E819D27 X-CRM114-Status: GOOD ( 13.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This driver enables clocks and then adds SPMI controller in probing, so we expect the reversed sequence in removal. Fix the order in the remove callback. Signed-off-by: Fei Shao Reviewed-by: AngeloGioacchino Del Regno --- drivers/spmi/spmi-mtk-pmif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spmi/spmi-mtk-pmif.c b/drivers/spmi/spmi-mtk-pmif.c index eb909a6e3b9e..2127bbd2f856 100644 --- a/drivers/spmi/spmi-mtk-pmif.c +++ b/drivers/spmi/spmi-mtk-pmif.c @@ -503,9 +503,9 @@ static void mtk_spmi_remove(struct platform_device *pdev) struct spmi_controller *ctrl = platform_get_drvdata(pdev); struct pmif *arb = spmi_controller_get_drvdata(ctrl); + spmi_controller_remove(ctrl); clk_bulk_disable_unprepare(arb->nclks, arb->clks); clk_bulk_put(arb->nclks, arb->clks); - spmi_controller_remove(ctrl); } static const struct of_device_id mtk_spmi_match_table[] = {