Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753727AbaJVObw (ORCPT ); Wed, 22 Oct 2014 10:31:52 -0400 Received: from filter1.ibarracuda.nl ([83.247.7.10]:49788 "EHLO filter1.ibarracuda.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753592AbaJVObp (ORCPT ); Wed, 22 Oct 2014 10:31:45 -0400 X-ASG-Debug-ID: 1413988302-0759e74a717a4f80002-xx1T2L X-Barracuda-Envelope-From: Frans.Klaver@xsens.com X-Barracuda-AUTH-User: xsenscom X-Barracuda-Apparent-Source-IP: 87.249.116.215 From: Frans Klaver To: Sebastian Reichel CC: Frans Klaver , Dmitry Eremin-Solenikov , David Woodhouse , Grant Likely , Rob Herring , Mark Rutland , =?UTF-8?q?Ren=C3=A9=20Moll?= , Guenter Roeck , , , Subject: [PATCH 10/13] power: reset: ltc2952: disable timers in _remove Date: Wed, 22 Oct 2014 16:31:07 +0200 X-ASG-Orig-Subj: [PATCH 10/13] power: reset: ltc2952: disable timers in _remove Message-ID: <1413988270-28092-11-git-send-email-frans.klaver@xsens.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1413988270-28092-1-git-send-email-frans.klaver@xsens.com> References: <1413988270-28092-1-git-send-email-frans.klaver@xsens.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.16.11.125] X-Barracuda-Connect: rev-215.116.249.87.virtu.nl[87.249.116.215] X-Barracuda-Start-Time: 1413988302 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: http://filter1.ibarracuda.nl:8000/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests=BSF_RULE_7582B X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.10827 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE_7582B Custom Rule 7582B Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Disable the timers when ltc2952_poweroff is removed. We don't want to risk calling functions on data that no longer exist. Signed-off-by: Frans Klaver --- drivers/power/reset/ltc2952-poweroff.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/power/reset/ltc2952-poweroff.c b/drivers/power/reset/ltc2952-poweroff.c index 8ab1da6..2f3fd5b 100644 --- a/drivers/power/reset/ltc2952-poweroff.c +++ b/drivers/power/reset/ltc2952-poweroff.c @@ -285,6 +285,8 @@ static int ltc2952_poweroff_remove(struct platform_device *pdev) struct ltc2952_poweroff *data = platform_get_drvdata(pdev); pm_power_off = NULL; + hrtimer_cancel(&data->timer_trigger); + hrtimer_cancel(&data->timer_wde); atomic_notifier_chain_unregister(&panic_notifier_list, &data->panic_notifier); return 0; -- 2.1.0 -- 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/