From patchwork Wed Feb 16 20:01:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 568351 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1GK8w1q011502 for ; Wed, 16 Feb 2011 20:09:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754231Ab1BPUI6 (ORCPT ); Wed, 16 Feb 2011 15:08:58 -0500 Received: from na3sys009aog105.obsmtp.com ([74.125.149.75]:47801 "EHLO na3sys009aog105.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754168Ab1BPUI6 (ORCPT ); Wed, 16 Feb 2011 15:08:58 -0500 Received: from source ([209.85.214.54]) (using TLSv1) by na3sys009aob105.postini.com ([74.125.148.12]) with SMTP ID DSNKTVwu2ONDXdLmJF02NnEqNjarBlv3nY0D@postini.com; Wed, 16 Feb 2011 12:08:57 PST Received: by bwz12 with SMTP id 12so1821693bwz.13 for ; Wed, 16 Feb 2011 12:08:55 -0800 (PST) Received: by 10.204.127.89 with SMTP id f25mr854927bks.143.1297886504547; Wed, 16 Feb 2011 12:01:44 -0800 (PST) Received: from localhost (cs181221087.pp.htv.fi [82.181.221.87]) by mx.google.com with ESMTPS id b6sm97599bkb.10.2011.02.16.12.01.42 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Feb 2011 12:01:43 -0800 (PST) From: Felipe Balbi To: Tony Lindgren Cc: Linux OMAP Mailing List , Felipe Balbi Subject: [PATCH 6/6 v2] cbus: retu: set pm_power_off to NULL when removing retu Date: Wed, 16 Feb 2011 22:01:21 +0200 Message-Id: <1297886481-26098-7-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.4.rc2 In-Reply-To: <1297886481-26098-1-git-send-email-balbi@ti.com> References: <1297886481-26098-1-git-send-email-balbi@ti.com> Organization: Texas Instruments\n Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 16 Feb 2011 20:09:21 +0000 (UTC) diff --git a/drivers/cbus/retu.c b/drivers/cbus/retu.c index a4c565b..0ca58b7 100644 --- a/drivers/cbus/retu.c +++ b/drivers/cbus/retu.c @@ -489,6 +489,7 @@ static int __init retu_probe(struct platform_device *pdev) return 0; err2: + pm_power_off = NULL; __retu_write_reg(retu, RETU_REG_IMR, 0xffff); free_irq(retu->irq, retu); @@ -504,13 +505,15 @@ static int __exit retu_remove(struct platform_device *pdev) { struct retu *retu = platform_get_drvdata(pdev); + pm_power_off = NULL; + the_retu = NULL; + /* Mask all RETU interrupts */ __retu_write_reg(retu, RETU_REG_IMR, 0xffff); free_irq(retu->irq, retu); retu_irq_exit(retu); kfree(retu); - the_retu = NULL; return 0; }