From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Subject: Re: [PATCH v10 5/5] Watchdog: ARM SBSA Generic Watchdog half timeout panic support Date: Thu, 4 Feb 2016 10:43:12 -0600 Message-ID: <56B37FA0.5000209@codeaurora.org> References: <1454519923-25230-1-git-send-email-fu.wei@linaro.org> <1454519923-25230-6-git-send-email-fu.wei@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-doc-owner@vger.kernel.org To: Mathieu Poirier , fu.wei@linaro.org Cc: Rob Herring , =?UTF-8?Q?Pawe=c5=82_Moll?= , Mark Rutland , Ian Campbell , Kumar Gala , wim@iguana.be, linux@roeck-us.net, Jon Corbet , Catalin Marinas , Will Deacon , Suravee.Suthikulpanit@amd.com, "linux-kernel@vger.kernel.org" , linux-watchdog@vger.kernel.org, linux-doc@vger.kernel.org, "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , linaro-acpi@lists.linaro.org, rruigrok@codeaurora.org, harba@codeaurora.org, Christopher Covington , dyoung@redhat.com, panand@redhat.com, graeme.gregory@linaro.org, al.stone@linaro.org, hanjun.guo@linaro.org, jcm@redhat.co List-Id: devicetree@vger.kernel.org Mathieu Poirier wrote: >> >+#ifdef CONFIG_ARM_SBSA_WATCHDOG_PANIC >> >+ irq = platform_get_irq(pdev, 0); >> >+ if (irq < 0) { >> >+ dev_err(dev, "unable to get ws0 interrupt.\n"); >> >+ return irq; >> >+ } >> >+#endif >> >+ > Can't the driver revert to single stage mode if platform_get_irq() > fails? That way the value of 'irq' can be tested throughout the > _probe() function and the #ifdefs removed. I like that idea. The same can be done with the devm_request_irq() call. It should definitely still display a warning if the command-line option is set but no interrupt is available.