Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1001044yba; Thu, 4 Apr 2019 02:08:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqo0sW1ACiKkJtAcKBAFumkdmLgvlTAFUqjkU1fMLTbomWnIiKRS0nh5kMAZMCkfKKV6se X-Received: by 2002:a62:1795:: with SMTP id 143mr4773358pfx.104.1554368889044; Thu, 04 Apr 2019 02:08:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554368889; cv=none; d=google.com; s=arc-20160816; b=Zx2TumGjUvx7NMwihPIfhn9/PD4CJcm20mjXxa8T7esUbfTq9tm9SkSLhar+ozqntr AW9sIvUfwL16lBL+Hzb13khm1CbWBtnCoVRxFmSdPAlF01wqLelO+jZy0VzRQLgCk3/V XzXwZDq/9wynjRM5yx8GVUgEtPkh+L2cRSneddFWaNi13yjkQnqOqKZWYnx99KSg5rhx 8s84c957wNlJyaDVsm3+eBHBP1paRBBEGfnA3PLLRBHT51Bv36rKr69dZTg7B2jdSsem HBytUr8WjG9VqnvPPZp9fHB31I7Rr196u4TtIMFw60ubbqmqAN9GqdDcd0o86bA6sZLc FWvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=s28PbfSqwOtRQSiAICoi4IZ1hXKfWrjM8fCWLJkXH40=; b=Vt1gR5G57Cn7nasXGxXh2J9f0AIZKg6B8Cv9cvoPstaNXycDzDVWJXquQAJxnj4CqV LhVlQA9xP2xr4BH2zHF9Vveke+gDef9K2K1MxX3+27dxoiq0S80eSThKaPyLkAPNX6sZ vE94BRgTZlPzGj084udjMwtojCCBRmOgCT07klsA2pz1pLGYF7D0mKTezPPfcqJmMAPM 8ciaw0pLtsTUpNgMrvAegg9BOlb0i09yZ5Q4r0+erE8ffDzji/UUEj5uCjGvvJwEkANu r/Kl0vQdCWtKi/BV3T/T49r6EpXQeE2qwSaQh23E/f2hS+cIO5rJYGtlnmzpLJGAE+jP Egdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f7GgwCBB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 73si16095640pgb.250.2019.04.04.02.07.53; Thu, 04 Apr 2019 02:08:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f7GgwCBB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732233AbfDDJHR (ORCPT + 99 others); Thu, 4 Apr 2019 05:07:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:46030 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732216AbfDDJHO (ORCPT ); Thu, 4 Apr 2019 05:07:14 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9765A2183E; Thu, 4 Apr 2019 09:07:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368834; bh=QW5DUS6pz2+BjaMs3rleFvD4NQXGRGfc+iLvi+sce0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f7GgwCBBDIdE7WEFT0m7x44zB5z73eUEC4zxkfTS/qak3ShMQNtho97ygrm14umrc o8uIEYYr7unTLWtLcRTt55bKWUSX38AfktspZrTPkgA9arUHxJQ+9Xw/mmIy/SVCue uhYWR5liYsYgYA54J3avWU6RstWGGt5PFCyWaPxA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jerome Brunet , Neil Armstrong , Sasha Levin Subject: [PATCH 4.19 179/187] clk: meson: clean-up clock registration Date: Thu, 4 Apr 2019 10:48:36 +0200 Message-Id: <20190404084611.558652834@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084603.119654039@linuxfoundation.org> References: <20190404084603.119654039@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 8d9981efbcab066d17af4d3c85c169200f6f78df ] Order, ids and size between the table of regmap clocks and the onecell data table could be different. Set regmap pointer in all the regmap clocks before starting the registration using the onecell data, to make sure we don't get into an incoherent situation. Signed-off-by: Jerome Brunet Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181221160239.26265-3-jbrunet@baylibre.com Signed-off-by: Sasha Levin --- drivers/clk/meson/meson-aoclk.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/clk/meson/meson-aoclk.c b/drivers/clk/meson/meson-aoclk.c index f965845917e3..258c8d259ea1 100644 --- a/drivers/clk/meson/meson-aoclk.c +++ b/drivers/clk/meson/meson-aoclk.c @@ -65,15 +65,20 @@ int meson_aoclkc_probe(struct platform_device *pdev) return ret; } - /* - * Populate regmap and register all clks - */ - for (clkid = 0; clkid < data->num_clks; clkid++) { + /* Populate regmap */ + for (clkid = 0; clkid < data->num_clks; clkid++) data->clks[clkid]->map = regmap; + /* Register all clks */ + for (clkid = 0; clkid < data->hw_data->num; clkid++) { + if (!data->hw_data->hws[clkid]) + continue; + ret = devm_clk_hw_register(dev, data->hw_data->hws[clkid]); - if (ret) + if (ret) { + dev_err(dev, "Clock registration failed\n"); return ret; + } } return devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, -- 2.19.1