From patchwork Tue Sep 9 14:06:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 4869971 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 3FBFEC0338 for ; Tue, 9 Sep 2014 14:10:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 01332200E5 for ; Tue, 9 Sep 2014 14:10:21 +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 9C0C520035 for ; Tue, 9 Sep 2014 14:10:19 +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 1XRM5k-0006Vv-EZ; Tue, 09 Sep 2014 14:08:20 +0000 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XRM5E-00063c-6Q for linux-arm-kernel@lists.infradead.org; Tue, 09 Sep 2014 14:07:48 +0000 Received: by mail-wi0-f177.google.com with SMTP id em10so581890wid.16 for ; Tue, 09 Sep 2014 07:07:26 -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=x09BZ2bnsAD6K+1h9JQ69mt6lJxIa0Br6ZCzjZUv2l8=; b=n7qxqMhiHzeqyz8kXA7X24eirLD4MeHCp+m6JftRhiG/CnifZPRgPKIb3lfq37EJPn WjIkOIBLkdFGYwMyMxr9lf/a5ea8PBKNnC8dMEH1ggLg31lKBGnifEX4yT16Z1FtSWFT 7LY6guXRoqEdUf55xfZoBqe03/EilgqPQ9VfxIWBgIAe0XmkWf2Okw2+zWuf6UZgQPJZ pOhVQc/T90QVqhAJsR4vXD5Fl7mD54gY3gwqHIkr0XBdoRaiiXtYIM3MG0ENIONI23cJ 5MNX37kXxEZMSodrjRWKioZ9O3mK62lllG+ZNEFzq1Zi6eDjgLrfMs0owaGdEjHTDqBA uDOw== X-Received: by 10.194.119.193 with SMTP id kw1mr43426178wjb.82.1410271645995; Tue, 09 Sep 2014 07:07:25 -0700 (PDT) Received: from cizrna.lan (37-48-42-146.tmcz.cz. [37.48.42.146]) by mx.google.com with ESMTPSA id bt9sm15019977wjc.44.2014.09.09.07.07.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Sep 2014 07:07:24 -0700 (PDT) From: Tomeu Vizoso To: Mike Turquette Subject: [PATCH v10 7/9] clk: Take the prepare lock when updating the list of per-user clks Date: Tue, 9 Sep 2014 16:06:50 +0200 Message-Id: <1410271612-27389-5-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1410271612-27389-1-git-send-email-tomeu.vizoso@collabora.com> References: <1410271329-26637-1-git-send-email-tomeu.vizoso@collabora.com> <1410271612-27389-1-git-send-email-tomeu.vizoso@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140909_070748_392963_31AAB61D X-CRM114-Status: UNSURE ( 9.72 ) 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=-4.3 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 3018f37..f283dcc 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; }