From patchwork Mon Dec 5 11:35:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 29652 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2196161wrr; Mon, 5 Dec 2022 03:40:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf4PiD2OiJsCSJzADqViLD/1dgyeNS2Rykk3WecYxyqd8N5NRp3MH/B22OCdSAICJnM9uEIm X-Received: by 2002:a17:90a:5983:b0:219:12a7:574e with SMTP id l3-20020a17090a598300b0021912a7574emr49732411pji.4.1670240457662; Mon, 05 Dec 2022 03:40:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670240457; cv=none; d=google.com; s=arc-20160816; b=to+aoxIOkKV2uw009/9DQBLykZiMBUGYCyZA/lM9/ikWjvycl/m5KWqtl7QBzStOnl dBg/06WXGqfaCnlc6ocgyb4okcF5Qf2TrXEcXB/R55NclLbY7fz6WxuZo4gN41Wn1aoM wnTBBLqQDB300+RRfTcTpx9ezbl8WJJ2nxuDkA1LakON6w7el7RFTD0qnKtZ2LjtyC5I BG9b1ThGwvOwdu66J4ZIF5D+jDI773sZq7Q695ExunE8iGcEn1f5PsXAoszCJ6XvuocA Fs0UBolaXzkFZ0IvsWknkeWncPt9864uvUx9wPEynEtpkQVA2e23RGJbLhHZ0wEkYLxX rfxw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=b9b59iFvofQpoKBEaYeQhFybU9NmyF7WlZBKIJce18E=; b=hBwhBtWD1MiEOKJHVhqbMZnziznBOy0RfJALjgP70lZjq4oEH9oZfvJdczVuFpeyxa RaBXuID7O7kfLoAc1jhb4dwIWp5g8LIf+A0S4PrfCWsojhs6vFi7w20YRzTlPK3w0OWn Dtm8Oir3XKXlrxzJ6h+9t8lCnX0JK3mlwPizM0RhiSibl3YD85CFGYWLA9Ll/IXa9Egl ac3I5lWcgI9DcPjKnrUjCmyFPk/kJns/0/8G2bYA0ng2mxY0PkoiIeCY9iHcYpBopUz4 59oLL60gKfa4z9jnN7H3FcnHjjO3pvjpWkahEpr2StcuWPMMkGeoNOh1lAH/Vz3vhFH6 Frew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sartura.hr header.s=sartura header.b=hbs+USPp; 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=REJECT sp=NONE dis=NONE) header.from=sartura.hr Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j36-20020a635964000000b004786230ec58si14138571pgm.169.2022.12.05.03.40.44; Mon, 05 Dec 2022 03:40:57 -0800 (PST) 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=@sartura.hr header.s=sartura header.b=hbs+USPp; 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=REJECT sp=NONE dis=NONE) header.from=sartura.hr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231191AbiLELf5 (ORCPT + 99 others); Mon, 5 Dec 2022 06:35:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231230AbiLELfx (ORCPT ); Mon, 5 Dec 2022 06:35:53 -0500 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B13C1A06B for ; Mon, 5 Dec 2022 03:35:52 -0800 (PST) Received: by mail-ed1-x536.google.com with SMTP id z92so15393853ede.1 for ; Mon, 05 Dec 2022 03:35:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura.hr; s=sartura; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=b9b59iFvofQpoKBEaYeQhFybU9NmyF7WlZBKIJce18E=; b=hbs+USPpFBZKRF/tug7MDLQSmfqVJbidEvpUgMVjKTYzJI+P7XcwTDngm7SahaSO0K iuQb3QeZi1ZOQPVCY4RNw2HabP89aKsWp5YylYgKiSrrYEIUANVuJ3lZdeFoepuKUPAl rpugTdctPHudbeVKnKvIfDTxgiSF309QLeAWd43944UlSOYsq+T/pURyZe04rnlZX4KZ NrevYRSFEvJM7S+Tr0Co7+XdUnidwDMtNCjN+bCG3Flys7Hrr109QkgnofeWDwt1a094 G6hm8n3dOEMVzwnU08SjqU/faHT/oKuqyFe1FDAg5BeAFWN6hHmUt+uZtvqB1XFadCk6 oBcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=b9b59iFvofQpoKBEaYeQhFybU9NmyF7WlZBKIJce18E=; b=XkMSn3SwMkfjKUNvgSyRbLnwhqIG2arl1PJiZa7GoeAumgpzVzQrUQfHJ3towP0Qg0 U02CMIAvPCn+HEzIKYqpTst/pkb9WhmBGTs3/0LheHU9odfeOIur32mXMuPHc/lAwr2h 5dwmzwGMuwILOyjsobufRV6mRT9nzmgPyjWwAq7VRg3qe2aOz+d/37N9KYzcHkc0mZXL EyN6/26NjdOnVj0q2/cO2N6UoRF5UfTC3FY/9P5sgfPYKinX0j9XGPgiHsFMv3HmpNk/ jpVs4ZVOclXMHP9EXOpJ7QjiduRZoQAxSkqY/rZBkqkVjttLPnqmeMkNg0fClPdlmLeK M1lw== X-Gm-Message-State: ANoB5pmf81BK4t3e8YDhNhaEi5vOUV9MB7Jl5AhHUHatmt4sFASyWaf8 2ojdk4GCn0db4W/ugatGW86kyQ== X-Received: by 2002:a05:6402:449b:b0:459:2b41:3922 with SMTP id er27-20020a056402449b00b004592b413922mr4788067edb.160.1670240150767; Mon, 05 Dec 2022 03:35:50 -0800 (PST) Received: from fedora.. ([188.252.220.250]) by smtp.googlemail.com with ESMTPSA id q26-20020a170906389a00b007bdc2de90e6sm6164189ejd.42.2022.12.05.03.35.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 03:35:50 -0800 (PST) From: Robert Marko To: andersson@kernel.org, agross@kernel.org, konrad.dybcio@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Cc: luka.perkov@sartura.hr, Robert Marko Subject: [PATCH] clk: qcom: gcc-ipq4019: switch to devm_clk_notifier_register Date: Mon, 5 Dec 2022 12:35:45 +0100 Message-Id: <20221205113545.575702-1-robert.marko@sartura.hr> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751374057785270328?= X-GMAIL-MSGID: =?utf-8?q?1751374057785270328?= Switch to using devres-managed version of clk_notifier_register(). This allows us to drop driver's remove() callback. Signed-off-by: Robert Marko --- drivers/clk/qcom/gcc-ipq4019.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/clk/qcom/gcc-ipq4019.c b/drivers/clk/qcom/gcc-ipq4019.c index 9102150d144a..e4cb9e240a72 100644 --- a/drivers/clk/qcom/gcc-ipq4019.c +++ b/drivers/clk/qcom/gcc-ipq4019.c @@ -1795,19 +1795,12 @@ static int gcc_ipq4019_probe(struct platform_device *pdev) if (err) return err; - return clk_notifier_register(apps_clk_src.clkr.hw.clk, - &gcc_ipq4019_cpu_clk_notifier); -} - -static int gcc_ipq4019_remove(struct platform_device *pdev) -{ - return clk_notifier_unregister(apps_clk_src.clkr.hw.clk, - &gcc_ipq4019_cpu_clk_notifier); + return devm_clk_notifier_register(&pdev->dev, apps_clk_src.clkr.hw.clk, + &gcc_ipq4019_cpu_clk_notifier); } static struct platform_driver gcc_ipq4019_driver = { .probe = gcc_ipq4019_probe, - .remove = gcc_ipq4019_remove, .driver = { .name = "qcom,gcc-ipq4019", .of_match_table = gcc_ipq4019_match_table,