Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761575AbYFDSgS (ORCPT ); Wed, 4 Jun 2008 14:36:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753188AbYFDSgH (ORCPT ); Wed, 4 Jun 2008 14:36:07 -0400 Received: from py-out-1112.google.com ([64.233.166.178]:52298 "EHLO py-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752211AbYFDSgG (ORCPT ); Wed, 4 Jun 2008 14:36:06 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=hoADxvkmN1jVJye9wT7DTmCHdXBWb4AT8p1RQ77nSL1Y3HbEsKVDeDVqwfq4+92Uth 10YA9INDWX3kRrqCDv+3lIQm/usB05RvtS8NHHg1bR92Sr10JzpiUQRdpRyBIGCP4qzM zdUOaWpDeRc7Jgp/NJOlXnDucMd0LqxFeySvU= Message-ID: Date: Wed, 4 Jun 2008 20:36:05 +0200 From: "Andrew Victor" To: "Alan Cox" Subject: Re: AT91SAM9/CAP9 watchdog driver Cc: "Andrew Morton" , wim@iguana.be, linux-arm-kernel@lists.arm.linux.org.uk, linux-kernel@vger.kernel.org In-Reply-To: <20080604123642.51449a04@core> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080603142316.c53b32b2.akpm@linux-foundation.org> <20080604123642.51449a04@core> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 906 Lines: 25 hi Alan, >> Since the watchdog registers are Write-Once, if the user does not >> specify a "wdt_timeout" parameter we'd still like the driver to load >> even if it's not enabled. > > Surely you can avoid doing the register writes until after you check the > validity of arguments ? The validity of the timeout value is checked in at91_wdt_settimeout(). It returns -EINVAL if the timeout value is invalid. The issue above is rather that probe() should not fail if at91_wdt_settimeout() returns -EINVAL, since we'd like the driver/module to still load to allow the user to later specify a valid timeout via ioctl(WDIOC_SETTIMEOUT). Regards, Andrew Victor -- 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/