From mboxrd@z Thu Jan 1 00:00:00 1970 From: mingo@elte.hu (Ingo Molnar) Date: Thu, 19 May 2011 11:08:49 +0200 Subject: [patch 4/7] clockevents: Provide combined configure and register function In-Reply-To: <20110518210136.331975870@linutronix.de> References: <20110518205713.947614271@linutronix.de> <20110518210136.331975870@linutronix.de> Message-ID: <20110519090849.GA6251@elte.hu> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org * Thomas Gleixner wrote: > +extern void clockevents_config_and_register(struct clock_event_device *dev, > + u32 freq, unsigned long min_delta, > + unsigned long max_delta); might be worth collecting these fields into a clocksource_params structure: struct clocksource_params { u32 freq; unsigned long min_delta; unsigned long max_delta; }; That way the initialization API looks even more streamlined: extern void clockevents_config_and_register(struct clock_event_device *dev, struct clocksource_params params); and could be extended in the future, without having to update every single clocksource driver again. But a good first step in any case: Reviewed-by: Ingo Molnar Thanks, Ingo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932786Ab1ESJJG (ORCPT ); Thu, 19 May 2011 05:09:06 -0400 Received: from mx3.mail.elte.hu ([157.181.1.138]:45345 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756864Ab1ESJJE (ORCPT ); Thu, 19 May 2011 05:09:04 -0400 Date: Thu, 19 May 2011 11:08:49 +0200 From: Ingo Molnar To: Thomas Gleixner Cc: LKML , LAK , John Stultz Subject: Re: [patch 4/7] clockevents: Provide combined configure and register function Message-ID: <20110519090849.GA6251@elte.hu> References: <20110518205713.947614271@linutronix.de> <20110518210136.331975870@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110518210136.331975870@linutronix.de> User-Agent: Mutt/1.5.20 (2009-08-17) X-ELTE-SpamScore: -2.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.3.1 -2.0 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Thomas Gleixner wrote: > +extern void clockevents_config_and_register(struct clock_event_device *dev, > + u32 freq, unsigned long min_delta, > + unsigned long max_delta); might be worth collecting these fields into a clocksource_params structure: struct clocksource_params { u32 freq; unsigned long min_delta; unsigned long max_delta; }; That way the initialization API looks even more streamlined: extern void clockevents_config_and_register(struct clock_event_device *dev, struct clocksource_params params); and could be extended in the future, without having to update every single clocksource driver again. But a good first step in any case: Reviewed-by: Ingo Molnar Thanks, Ingo