Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1313562rdb; Wed, 6 Dec 2023 15:18:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IH252xGnT6oeK0rNfllWCYiUPnH0VUi0Xi4V/7THb1x5LipJB44LZOcDQsGqhRFjebG6xGt X-Received: by 2002:a05:6a00:1251:b0:6ce:4e63:ed7c with SMTP id u17-20020a056a00125100b006ce4e63ed7cmr1449044pfi.51.1701904725602; Wed, 06 Dec 2023 15:18:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701904725; cv=none; d=google.com; s=arc-20160816; b=fwt9pH9YouE1+uiUH+xSsuB4S0ReVtzS23HOuxqeNBOOmrtkPuXO8ppYBp6GvwYdv6 aW5iuywDzp3KhWPgRAPunBErHmwMkxe2P89ZzQxqkSKX7EcoIGoUvR4c3P27JPB+tOaP AYoQWSYfUQCv/91IDVhydna8q9CaL94P5OhV2GXEZ+oo0RaKY2mshiJ/WBI4L66h4/aW W2s9pKUW8GZk+MSU0viKNQY1/dkl784Yj2BxwlQD9aGPNL34TjrPasd9pGh8aXcvJJWd 1rFwtzteLyNb8n3MQ6ANJPzMXigTeFdKl5JpYVYeRlKSX9cwtuq1a4rGHorzpp3YAc94 Ktqg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2aQSEZ8mWupx7iBojEmnO4BJWlffS1cn+a5CTpv+RNk=; fh=fyWHa9Xga1kBSwfIj7Gdwg4R3yg35b+1QQ92cERVV+E=; b=cv3wXdXPSND64zYSofldSI5hZ6/HoXbXJGc23v/2YtJy48Uxfw6PSc48sEYg3pBl1d VgOdbC1k/cPpUgw1m+FBkMbET+hCRIJR20wdY6YKKHcwkycC7xa2r5uemOzz0heosiJ/ v1NVMu8et9cgavpemth/CzUsPdf1M67ILshSyN4X0xCWiUb4a/NiBc/cWrQhxjOQ6ntE Q3XejMX0m3ZyDLdPCBJyXv9G1F1lYdSlcSmO1yBfLuykODHeNNJxP3J9cMahxfaTOyc9 uLUVJcdKo7NQn3u52QHa/HnuZDH8SRsvTmWCcTNz3gwSod7cfGJWA+cnXAGTSuNl45DG 8jaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ldO8y0aa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id b38-20020a631b66000000b005bdf5961d93si46272pgm.387.2023.12.06.15.18.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 15:18:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ldO8y0aa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2F66A81EE53C; Wed, 6 Dec 2023 15:18:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379666AbjLFXRj (ORCPT + 99 others); Wed, 6 Dec 2023 18:17:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379617AbjLFXRa (ORCPT ); Wed, 6 Dec 2023 18:17:30 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D218BD69 for ; Wed, 6 Dec 2023 15:17:36 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3424CC433CB; Wed, 6 Dec 2023 23:17:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701904656; bh=8uz7AK/6yHawqaJPcw4bg1vliKDTq/KL8xQPTh+RBhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ldO8y0aaCAI30pGHZ+jGi3ri+gv6J7mHp87soVwGOCnw7hGcQgtXzAK6BzELZoYXT EkEFX2BuYSZfAhST/kM4KnpgfrUHGV4vAsB7+Ouh4jfVeliyoFM5Qhy/H7rOju9C5n fW2tyyccaFPGkmXsN/rlupyXFxMt0EKFplWPVCQy/CmqxlalQSkr7GtccdcDSbvVNR 3wy2y6YX/LW2rtq8M5iliwsM/Fx8Pg4+Ge8xxfSFebR//VvU94kwwBFAKUZaoVgj79 MUX+xlMD1xRnCl2NeZL2/zAlrXEnZasnuLWe3loDsHzSUMGaKwJFLs9qgItr2iDKaP ESqXecPm63nDg== From: Stephen Boyd To: Greg Kroah-Hartman Cc: Fei Shao , linux-kernel@vger.kernel.org, patches@lists.linux.dev, AngeloGioacchino Del Regno Subject: [PATCH 5/8] spmi: mtk-pmif: Reorder driver remove sequence Date: Wed, 6 Dec 2023 15:17:28 -0800 Message-ID: <20231206231733.4031901-6-sboyd@kernel.org> X-Mailer: git-send-email 2.43.0.rc2.451.g8631bc7472-goog In-Reply-To: <20231206231733.4031901-1-sboyd@kernel.org> References: <20231206231733.4031901-1-sboyd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 06 Dec 2023 15:18:41 -0800 (PST) From: Fei Shao 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 Link: https://lore.kernel.org/r/20230824104101.4083400-4-fshao@chromium.org Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Stephen Boyd --- 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 6ebc6901490a..cc660da6a037 100644 --- a/drivers/spmi/spmi-mtk-pmif.c +++ b/drivers/spmi/spmi-mtk-pmif.c @@ -515,9 +515,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[] = { -- https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git