From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH v6 3/5] watchdog: at91sam9_wdt: add device tree support Date: Tue, 2 Oct 2012 21:59:14 +0200 Message-ID: <20121002195914.GG21046@lunn.ch> References: <1349094281-28889-1-git-send-email-fabio.porcedda@gmail.com> <1349094281-28889-4-git-send-email-fabio.porcedda@gmail.com> <20121001124546.GE11837@lunn.ch> <20121001130658.GG11837@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Fabio Porcedda Cc: Andrew Lunn , linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Wim Van Sebroeck , Andrew Victor , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Jason Cooper List-Id: devicetree@vger.kernel.org > I was thinking to add a more generic helper function like this: > > static inline void watchdog_get_dttimeout(struct device_node *node, > u32 *timeout) > { > if (node) > of_property_read_u32(node, "timeout", &wdd->timeout); > } You forgot to change the function signature. Also, if you are adding a generic function, it should be a generic function for the framework. All drivers should be slowly moving towards the framework, so adding functions which help you not move towards the framework are wrong. Andrew