Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754428AbbKYOKY (ORCPT ); Wed, 25 Nov 2015 09:10:24 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:42168 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751575AbbKYOKW (ORCPT ); Wed, 25 Nov 2015 09:10:22 -0500 Subject: Re: [PATCH 5/10] watchdog: bcm63xx_wdt: Use WATCHDOG_CORE To: Simon Arlott References: <5650BFD6.5030700@simon.arlott.org.uk> <5650C08C.6090300@simon.arlott.org.uk> <5650E2FA.6090408@roeck-us.net> <5650E5BB.6020404@simon.arlott.org.uk> <56512937.6030903@roeck-us.net> <5651CB13.4090704@simon.arlott.org.uk> <5651CBF0.30904@simon.arlott.org.uk> <56552099.7070709@roeck-us.net> <726719450643bb69683224d731b582b0df27fe1f@8b5064a13e22126c1b9329f0dc35b8915774b7c3.invalid> Cc: "devicetree@vger.kernel.org" , Ralf Baechle , Thomas Gleixner , Jason Cooper , Marc Zyngier , Kevin Cernekee , Florian Fainelli , Wim Van Sebroeck , Maxime Bizon , Linux Kernel Mailing List , linux-mips@linux-mips.org, linux-watchdog@vger.kernel.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Jonas Gorski From: Guenter Roeck Message-ID: <5655C149.5010008@roeck-us.net> Date: Wed, 25 Nov 2015 06:10:17 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <726719450643bb69683224d731b582b0df27fe1f@8b5064a13e22126c1b9329f0dc35b8915774b7c3.invalid> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1297 Lines: 37 On 11/25/2015 05:02 AM, Simon Arlott wrote: > On Wed, November 25, 2015 02:44, Guenter Roeck wrote: >> The "running" flag should no longer be needed. watchdog_active() >> should provide that information. > > I'm going to need to keep that because I need to know if it's running > in the interrupt handler, and wdd->lock is a mutex. > >>> @@ -306,17 +202,18 @@ unregister_timer: >>> >>> static int bcm63xx_wdt_remove(struct platform_device *pdev) >>> { >>> - if (!nowayout) >>> - bcm63xx_wdt_hw_stop(); >>> + struct watchdog_device *wdd = platform_get_drvdata(pdev); >>> >>> - misc_deregister(&bcm63xx_wdt_miscdev); >>> bcm63xx_timer_unregister(TIMER_WDT_ID); >>> + watchdog_unregister_device(wdd); >> >> Shouldn't that come first, before unregistering the timer ? > > No, because wdd->dev is used in the interrupt handler. I will have to > move registration of the interrupt to after creating the watchdog > because it could currently be used before wdd->dev is set. > Does unregistering the timer disable the interrupt ? Thanks, Guenter -- 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/