Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753834AbbK3ItP (ORCPT ); Mon, 30 Nov 2015 03:49:15 -0500 Received: from conssluserg003.nifty.com ([202.248.44.41]:59635 "EHLO conssluserg003-v.nifty.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753586AbbK3ItM (ORCPT ); Mon, 30 Nov 2015 03:49:12 -0500 X-Nifty-SrcIP: [209.85.160.173] MIME-Version: 1.0 In-Reply-To: <1448873164-22415-1-git-send-email-yamada.masahiro@socionext.com> References: <1448873164-22415-1-git-send-email-yamada.masahiro@socionext.com> Date: Mon, 30 Nov 2015 17:48:55 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] clk: let of_clk_get_parent_name() fail for invalid clock-indices From: Masahiro Yamada To: linux-clk@vger.kernel.org Cc: Masahiro Yamada , Stephen Boyd , Michael Turquette , Linux Kernel Mailing List , linux-gpio@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1443 Lines: 47 2015-11-30 17:46 GMT+09:00 Masahiro Yamada : > Currently, of_clk_get_parent_name() returns a wrong parent clock name > when "clock-indices" property exists and the target index is not > found in the property. In this case, NULL should be returned. > > For example, > > oscillator { > compatible = "myclocktype"; > #clock-cells = <1>; > clock-indices = <1>, <3>; > clock-output-names = "clka", "clkb"; > }; > > consumer { > compatible = "myclockconsumer"; > clocks = <&oscillator 0>, <&oscillator 1>; > }; > > Currently, of_clk_get_parent_name(consumer_np, 0) returns "clka" > (and of_clk_get_parent_name(consumer_np, 1) also returns "clka", > this is correct). Because the "clock-indices" in the clock parent > does not contain <0>, of_clk_get_parent_name(consumer_np, 0) should > return NULL. > > Signed-off-by: Masahiro Yamada I've sent v2 to linux-gpio@vger.kernel.org by mistake. My intention was to send it linux-clk@vger.kernel.org. Sorry, Linus Walleij. -- Best Regards Masahiro Yamada -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/