From patchwork Fri Feb 14 06:16:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 3650171 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 0E70FBF13A for ; Fri, 14 Feb 2014 06:18:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 04DB520218 for ; Fri, 14 Feb 2014 06:18:49 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (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 02AA720213 for ; Fri, 14 Feb 2014 06:18:48 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WEC5i-0002VI-2X; Fri, 14 Feb 2014 06:17:38 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WEC5a-00072u-Ha; Fri, 14 Feb 2014 06:17:30 +0000 Received: from avon.wwwdotorg.org ([70.85.31.133]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WEC5O-00070U-O0; Fri, 14 Feb 2014 06:17:19 +0000 Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id DCA586205; Thu, 13 Feb 2014 23:16:57 -0700 (MST) Received: from dart.wwwdotorg.org (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id 7D680E40F4; Thu, 13 Feb 2014 23:16:39 -0700 (MST) From: Stephen Warren To: Mike Turquette Subject: [PATCH 1/2] clk: fixed-rate: use full DT node name Date: Thu, 13 Feb 2014 23:16:52 -0700 Message-Id: <1392358613-19962-1-git-send-email-swarren@wwwdotorg.org> X-Mailer: git-send-email 1.8.3.2 X-NVConfidentiality: public X-Virus-Scanned: clamav-milter 0.97.8 at avon.wwwdotorg.org X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140214_011718_854672_ABE0D19B X-CRM114-Status: GOOD ( 11.80 ) X-Spam-Score: -2.6 (--) Cc: devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Stephen Warren X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 clk-fixed-rate currently names clocks according to a node's name without the unit address. When faced with the legal and technically correct DT structure below, this causes rgistration attempts for 3 clocks with the same name, 2 of which fail. clocks { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <0>; clk_mmc: clock@0 { compatible = "fixed-clock"; reg = <0>; ... clk_i2c: clock@1 { compatible = "fixed-clock"; reg = <1>; ... clk_spi: clock@2 { compatible = "fixed-clock"; reg = <2>; ... Solve this by naming the clocks after the full node name rather than the short version (e.g. /clocks/clock@0). Signed-off-by: Stephen Warren --- Note that if this is accepted, I intend to submit a patch for the RPi DTS which uses the naming structure above, so it might be useful to place this patch in its own branch. Or, I could submit the cleanup after 3.15-rc1. --- drivers/clk/clk-fixed-rate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c index 0fc56ab..3335b3c 100644 --- a/drivers/clk/clk-fixed-rate.c +++ b/drivers/clk/clk-fixed-rate.c @@ -115,7 +115,7 @@ EXPORT_SYMBOL_GPL(clk_register_fixed_rate); void of_fixed_clk_setup(struct device_node *node) { struct clk *clk; - const char *clk_name = node->name; + const char *clk_name = node->full_name; u32 rate; u32 accuracy = 0;