Message ID | ae2234e4b639d2e80c8e5b8f7e25f3d0fe7acfde.1540970653.git.matti.vaittinen@fi.rohmeurope.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-msm-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D3EAC1734 for <patchwork-linux-arm-msm@patchwork.kernel.org>; Wed, 31 Oct 2018 08:32:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C028C2A317 for <patchwork-linux-arm-msm@patchwork.kernel.org>; Wed, 31 Oct 2018 08:32:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B33652A338; Wed, 31 Oct 2018 08:32: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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable 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 71FE42A32E for <patchwork-linux-arm-msm@patchwork.kernel.org>; Wed, 31 Oct 2018 08:32:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727532AbeJaR3o (ORCPT <rfc822;patchwork-linux-arm-msm@patchwork.kernel.org>); Wed, 31 Oct 2018 13:29:44 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:36175 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbeJaR3o (ORCPT <rfc822;linux-arm-msm@vger.kernel.org>); Wed, 31 Oct 2018 13:29:44 -0400 Received: by mail-lj1-f193.google.com with SMTP id s15-v6so14015737lji.3; Wed, 31 Oct 2018 01:32:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=COmn/EezDX/GWsah2t8NJRxiKg5KtxdFjJeZJYU4E4A=; b=jlFx/T+p+RgRgjXrO2VaGgFP4Cw0dZnt0JjhgmDOOLQjQi9idUMuBBOK4eIBJwI/of EW8Uaec6xdTPkxHqg2Mvqfua5FhOVsO2oVWw2YsrX/kApkmw0M3WLPoNJ4Ym9JJRVdyT XcENAB1W39KIOZn5ZjfY0ZA/0OPA07QM/rsDq2nWqgUefsSf+SsA/U+XTGseQY66p39c 4+5j1m1IPhEI5x44bOUG6LFoxTOCKXhykQOD4peIc/htrjuDKyrUziXevmJdkF2mE+1g MOvNlDwhvJJwZk940M2mJxdBE0iMHNkBncVzlXE1Eo5MkpYBoYOEvJu6tBleW0J/Ma9B gOpg== X-Gm-Message-State: AGRZ1gLhWBY0jNz8GZJ7Ue8dq1OwSqkunAQXeWcHD37V26x1R4gGGBAM 0EJ9/w6iCxqQ7othAEQj9AI= X-Google-Smtp-Source: AJdET5dN5g/dAlTN28IcLopaJGJqDFRn9JUStvqdSb8+QrYQcyIrmuQUnYRVAQPdJ563Hod4iCxVeQ== X-Received: by 2002:a2e:1510:: with SMTP id s16-v6mr1345261ljd.4.1540974754722; Wed, 31 Oct 2018 01:32:34 -0700 (PDT) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id j13-v6sm3966819ljh.42.2018.10.31.01.32.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 01:32:34 -0700 (PDT) Date: Wed, 31 Oct 2018 10:32:21 +0200 From: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> To: Jonathan Corbet <corbet@lwn.net>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Chanwoo Choi <cw00.choi@samsung.com>, Krzysztof Kozlowski <krzk@kernel.org>, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>, Russell King <linux@armlinux.org.uk>, Andy Gross <andy.gross@linaro.org>, David Brown <david.brown@linaro.org>, Kukjin Kim <kgene@kernel.org>, Sylwester Nawrocki <s.nawrocki@samsung.com>, Tomasz Figa <tomasz.figa@gmail.com>, Andrey Smirnov <andrew.smirnov@gmail.com>, Sebastian Reichel <sre@kernel.org>, Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh@kernel.org>, Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>, Huang Shijie <sjhuang@iluvatar.ai>, Akshu Agrawal <Akshu.Agrawal@amd.com>, "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>, Daniel Kurtz <djkurtz@chromium.org>, mazziesaccount@gmail.com Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, matti.vaittinen@fi.rohmeurope.com Subject: [PATCH 4/8] clk: clk-st: avoid clkdev lookup leak at remove Message-ID: <ae2234e4b639d2e80c8e5b8f7e25f3d0fe7acfde.1540970653.git.matti.vaittinen@fi.rohmeurope.com> References: <cover.1540970653.git.matti.vaittinen@fi.rohmeurope.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <cover.1540970653.git.matti.vaittinen@fi.rohmeurope.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: <linux-arm-msm.vger.kernel.org> X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
clk: clkdev: managed clk lookup and provider registrations
|
expand
|
diff --git a/drivers/clk/x86/clk-st.c b/drivers/clk/x86/clk-st.c index fb62f3938008..32d8df9bd853 100644 --- a/drivers/clk/x86/clk-st.c +++ b/drivers/clk/x86/clk-st.c @@ -52,7 +52,8 @@ static int st_clk_probe(struct platform_device *pdev) 0, st_data->base + MISCCLKCNTL1, OSCCLKENB, CLK_GATE_SET_TO_DISABLE, NULL); - clk_hw_register_clkdev(hws[ST_CLK_GATE], "oscout1", NULL); + devm_clk_hw_register_clkdev(&pdev->dev, hws[ST_CLK_GATE], "oscout1", + NULL); return 0; }
Use devm based clkdev lookup registration to avoid leaking lookup structures. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> --- drivers/clk/x86/clk-st.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)