Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753557AbcDKKmF (ORCPT ); Mon, 11 Apr 2016 06:42:05 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:42327 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752758AbcDKKmC (ORCPT ); Mon, 11 Apr 2016 06:42:02 -0400 Subject: Re: [PATCH v3 05/16] ARM: davinci: add set_parent callback for mux clocks To: David Lechner References: <1458863503-31121-1-git-send-email-david@lechnology.com> <1458863503-31121-6-git-send-email-david@lechnology.com> CC: , , , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Kevin Hilman , Kishon Vijay Abraham I , Greg Kroah-Hartman , Alan Stern , Bin Liu , Lee Jones , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list , "moderated list:ARM PORT" , "open list:USB SUBSYSTEM" From: Sekhar Nori Message-ID: <570B7F0C.8000503@ti.com> Date: Mon, 11 Apr 2016 16:10:12 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1458863503-31121-6-git-send-email-david@lechnology.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1492 Lines: 51 On Friday 25 March 2016 05:21 AM, David Lechner wrote: > Introduce a set_parent callback that will be used for mux clocks, such as > the USB PHY muxes and the async3 clock domain mux. > > Signed-off-by: David Lechner > --- > > v3 changes: none. > > > arch/arm/mach-davinci/clock.c | 17 ++++++++++++++++- > arch/arm/mach-davinci/clock.h | 1 + > 2 files changed, 17 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c > index a5c2629..dfc2eb3 100644 > --- a/arch/arm/mach-davinci/clock.c > +++ b/arch/arm/mach-davinci/clock.c > @@ -195,6 +195,13 @@ int clk_set_parent(struct clk *clk, struct clk *parent) > return -EINVAL; > > mutex_lock(&clocks_mutex); > + if (clk->set_parent) { > + int ret = clk->set_parent(clk, parent); Need empty line here. > + if (ret) { > + mutex_unlock(&clocks_mutex); > + return ret; > + } > + } > clk->parent = parent; > list_del_init(&clk->childnode); > list_add(&clk->childnode, &clk->parent->children); > @@ -224,8 +231,16 @@ int clk_register(struct clk *clk) > > mutex_lock(&clocks_mutex); > list_add_tail(&clk->node, &clocks); > - if (clk->parent) > + if (clk->parent) { > + if (clk->set_parent) { > + int ret = clk->set_parent(clk, clk->parent); Here too. Applying this patch with these local changes. BTW, checkpatch complained about these. Please try to address all warnings unless there is a good reason not to fix one. Thanks, Sekhar