From patchwork Mon Sep 22 14:15:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 4948061 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EF994BEEA6 for ; Mon, 22 Sep 2014 14:19:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C07CC20219 for ; Mon, 22 Sep 2014 14:19:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3F28220121 for ; Mon, 22 Sep 2014 14:19:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XW4Qm-0001Zx-7v; Mon, 22 Sep 2014 14:17:32 +0000 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XW4Q5-0000lr-Gf for linux-arm-kernel@lists.infradead.org; Mon, 22 Sep 2014 14:16:50 +0000 Received: by mail-wi0-f171.google.com with SMTP id ho1so3016324wib.10 for ; Mon, 22 Sep 2014 07:16:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=HbP7oFzyjnnjzrCEaRDHR/OX8Ph70hUhvCA9hvZ9UbU=; b=zTAw+we/dsm1/mrnP+PYMWznCAkXLsshW4v4pHUfbpWUB2dBG/kzdmGCsczvGhkasX dhmBtLJumD8kGGsQU88LL2xqhXmBHVBXC77etWucaQhuU+zz1IFi71AP5lPw5jFvvDoz 8sFvglLEJttsiMXRKlkOUrJXpEz2GpwHcvdfHAyCrVPSwrr+lJv+xFzsH/1nCU4OL/tT TTbs0Bj1e2NX+yes+t7Ze/TH3yYmkIbooc7Kle1CROCRk3y1gnaAFe8smQ9+jwCZm9OK XDySGNnXXHn8XgTKr8WPugjQFAqH2w+rjTIuJoO5WjKGPjybcmqgjO5g7DSkoRhnu5J2 7V4w== X-Received: by 10.181.29.134 with SMTP id jw6mr15473703wid.69.1411395387347; Mon, 22 Sep 2014 07:16:27 -0700 (PDT) Received: from cizrna.lan (37-48-36-100.tmcz.cz. [37.48.36.100]) by mx.google.com with ESMTPSA id t9sm12442274wjf.41.2014.09.22.07.16.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Sep 2014 07:16:26 -0700 (PDT) From: Tomeu Vizoso To: Mike Turquette Subject: [PATCH v12 08/10] clk: Take the prepare lock when updating the list of per-user clks Date: Mon, 22 Sep 2014 16:15:51 +0200 Message-Id: <1411395353-3189-5-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1411395353-3189-1-git-send-email-tomeu.vizoso@collabora.com> References: <1411395124-2476-1-git-send-email-tomeu.vizoso@collabora.com> <1411395353-3189-1-git-send-email-tomeu.vizoso@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140922_071649_715294_3069EFB3 X-CRM114-Status: UNSURE ( 9.87 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Tomeu Vizoso , Stephen Warren , Peter De Schrijver , linux-kernel@vger.kernel.org, tomasz.figa@gmail.com, rabin@rab.in, Thierry Reding , Javier Martinez Canillas , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Tomeu Vizoso --- drivers/clk/clk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 2a71f6c..17b6ba1 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -560,7 +560,9 @@ struct clk *__clk_create_clk(struct clk_core *clk_core, const char *dev, clk->dev_id = dev; clk->con_id = con; + clk_prepare_lock(); hlist_add_head(&clk->child_node, &clk_core->per_user_clks); + clk_prepare_unlock(); return clk; }