From patchwork Wed Feb 17 07:38:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 79839 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1H7cl3M002735 for ; Wed, 17 Feb 2010 07:38:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934104Ab0BQHiq (ORCPT ); Wed, 17 Feb 2010 02:38:46 -0500 Received: from mail-yw0-f176.google.com ([209.85.211.176]:61066 "EHLO mail-yw0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934100Ab0BQHio (ORCPT ); Wed, 17 Feb 2010 02:38:44 -0500 Received: by mail-yw0-f176.google.com with SMTP id 6so5337065ywh.4 for ; Tue, 16 Feb 2010 23:38:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=rZD12bDTYAi3S8Mg1/5dbnINEVa8VbSkmqyxDW4yIvM=; b=Z8yXg6YqNwJXzW0e3boOy6EYg4vRlMVexSsC9bMy5CWakSTNMg/3xiiDTmIAsNgdFB oOPD1woy7WNuAKVe1U8EvMfsJwV4LpBiTbYjMROraHl00JW7doTxPkYPb50hbjVt+9pC 2YirdbvJ9oXHKb9slBMTiI13y1nGUVMldy1HU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=Ytgm7hD+dAl2mLPaTFbs7JOOcV2W0MqHoM5lYVtvf7+O36RJxdv15BvxXh3GI+GyW4 R9IgeGLtmfi/TjtcaoTpkpsw4s12b4o4OHYGTeAHB5qP9rx4jj6lPLEt3Gk+Z7GrHl0o XvOVhDFIMHjnYioopH/133kyMZhERqH4ZQV2c= Received: by 10.91.19.3 with SMTP id w3mr642884agi.60.1266392324312; Tue, 16 Feb 2010 23:38:44 -0800 (PST) Received: from ?127.0.0.1? (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id 16sm685284gxk.1.2010.02.16.23.38.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Feb 2010 23:38:43 -0800 (PST) From: Magnus Damm To: linux-mmc@vger.kernel.org Cc: sameo@linux.intel.com, linux-sh@vger.kernel.org, linus.ml.walleij@gmail.com, akpm@linux-foundation.org, goda.yusuke@renesas.com, ian@mnementh.co.uk, lethal@linux-sh.org, Magnus Damm , g.liakhovetski@gmx.de Date: Wed, 17 Feb 2010 16:38:23 +0900 Message-Id: <20100217073823.32726.10307.sendpatchset@t400s> In-Reply-To: <20100217073735.32726.12020.sendpatchset@t400s> References: <20100217073735.32726.12020.sendpatchset@t400s> Subject: [PATCH 05/05] tmio_mmc: Balance cell enable()/disable() calls Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 17 Feb 2010 07:38:47 +0000 (UTC) --- 0004/drivers/mmc/host/tmio_mmc.c +++ work/drivers/mmc/host/tmio_mmc.c 2010-02-17 15:54:01.000000000 +0900 @@ -569,14 +569,14 @@ static int __devinit tmio_mmc_probe(stru if (ret >= 0) host->irq = ret; else - goto unmap_ctl; + goto cell_disable; disable_mmc_irqs(host, TMIO_MASK_ALL); ret = request_irq(host->irq, tmio_mmc_irq, IRQF_DISABLED | IRQF_TRIGGER_FALLING, dev_name(&dev->dev), host); if (ret) - goto unmap_ctl; + goto cell_disable; mmc_add_host(mmc); @@ -588,6 +588,9 @@ static int __devinit tmio_mmc_probe(stru return 0; +cell_disable: + if (cell->disable) + cell->disable(dev); unmap_ctl: iounmap(host->ctl); host_free: @@ -598,6 +601,7 @@ out: static int __devexit tmio_mmc_remove(struct platform_device *dev) { + struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data; struct mmc_host *mmc = platform_get_drvdata(dev); platform_set_drvdata(dev, NULL); @@ -606,6 +610,8 @@ static int __devexit tmio_mmc_remove(str struct tmio_mmc_host *host = mmc_priv(mmc); mmc_remove_host(mmc); free_irq(host->irq, host); + if (cell->disable) + cell->disable(dev); iounmap(host->ctl); mmc_free_host(mmc); }