Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946089AbbEVQxw (ORCPT ); Fri, 22 May 2015 12:53:52 -0400 Received: from mail-qk0-f181.google.com ([209.85.220.181]:32910 "EHLO mail-qk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1945995AbbEVQxu (ORCPT ); Fri, 22 May 2015 12:53:50 -0400 MIME-Version: 1.0 In-Reply-To: <555E5B5C.9050807@imgtec.com> References: <1432244260-14908-1-git-send-email-ezequiel.garcia@imgtec.com> <1432244260-14908-4-git-send-email-ezequiel.garcia@imgtec.com> <555E5B5C.9050807@imgtec.com> Date: Fri, 22 May 2015 09:53:49 -0700 X-Google-Sender-Auth: UHaB_RFTv0uFpSZdfYSM8yZvLgA Message-ID: Subject: Re: [PATCH 3/7] clocksource: mips-gic: Split clocksource and clockevent initialization From: Andrew Bresticker To: Ezequiel Garcia Cc: "linux-kernel@vger.kernel.org" , Linux-MIPS , Daniel Lezcano , "devicetree@vger.kernel.org" , James Hartley , James Hogan , Thomas Gleixner , Damien Horsley , Govindraj Raja 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: 2017 Lines: 52 On Thu, May 21, 2015 at 3:25 PM, Ezequiel Garcia wrote: > > > On 05/21/2015 07:24 PM, Andrew Bresticker wrote: >> On Thu, May 21, 2015 at 2:37 PM, Ezequiel Garcia >> wrote: >>> This is preparation work for the introduction of clockevent frequency >>> update with a clock notifier. This is only possible when the device >>> is passed a clk struct, so let's split the legacy and devicetree >>> initialization. >>> >>> Signed-off-by: Ezequiel Garcia >>> --- >>> drivers/clocksource/mips-gic-timer.c | 13 ++++++++----- >>> 1 file changed, 8 insertions(+), 5 deletions(-) >>> >>> diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c >>> index c4352f0..22a4daf 100644 >>> --- a/drivers/clocksource/mips-gic-timer.c >>> +++ b/drivers/clocksource/mips-gic-timer.c >>> @@ -142,11 +142,6 @@ static void __init __gic_clocksource_init(void) >>> ret = clocksource_register_hz(&gic_clocksource, gic_frequency); >>> if (ret < 0) >>> pr_warn("GIC: Unable to register clocksource\n"); >>> - >>> - gic_clockevent_init(); >>> - >>> - /* And finally start the counter */ >>> - gic_start_count(); >>> } >> >> Instead of duplicating this bit in both the OF and non-OF paths, maybe >> it would be better to do the notifier registration in >> gic_clockevent_init(), either by passing around the struct clk or >> making it a global? >> > > Yeah, I had something like that first, but somehow it looked ugly to have: > > gic_clockevent_init(IS_ERR(clk) ? NULL : clk); > > Don't have a strong opinion though. Ah that is a bit ugly. I'm fine either way though, so: Reviewed-by: Andrew Bresticker -- 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/