From patchwork Fri Oct 30 08:42:31 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vimal singh X-Patchwork-Id: 56582 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9U8grv4015717 for ; Fri, 30 Oct 2009 08:42:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756480AbZJ3Imr (ORCPT ); Fri, 30 Oct 2009 04:42:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756482AbZJ3Imr (ORCPT ); Fri, 30 Oct 2009 04:42:47 -0400 Received: from mail-bw0-f227.google.com ([209.85.218.227]:53316 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756480AbZJ3Imq (ORCPT ); Fri, 30 Oct 2009 04:42:46 -0400 Received: by mail-bw0-f227.google.com with SMTP id 27so3265936bwz.21 for ; Fri, 30 Oct 2009 01:42:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=TgN58aw1EZeQCFgd+NJ4nMS0avL3iifitb0OMuOz6M4=; b=AypYbukF1kqZeXG1BSagRJrVt1SCSSivDsHSEDuW6UXHvzZipZ6saVSXW81rJN9Qyp 1dNA/adLwjh87vCUtWldRzZxhe60iNOpaQ1hc4MOlXLjooElKf844JbFVTFnYIPMOdex q3ObBLoWNB1yrALCkiwInFL0JvmLOOmKM1Das= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=epv3o3Mf6Q9qwcXsHAWT8bSMtN24CYe7qM9e+q2tNc4pkq1KQjN9rCOkm+3UGr9bq7 AY/9fiXVLKYGrbyq4SUiEUSTak8wlHDlbkx6zPkCMzpt9+fbOKutgtvzH/z4k8QIueYh WBuSsQUAOUMEglMY2lm7mAEou21HyN1kXyEtI= MIME-Version: 1.0 Received: by 10.204.154.69 with SMTP id n5mr904938bkw.43.1256892171156; Fri, 30 Oct 2009 01:42:51 -0700 (PDT) In-Reply-To: References: From: Vimal Singh Date: Fri, 30 Oct 2009 14:12:31 +0530 Message-ID: Subject: Re: [PATCH 2/3]NAND: OMAP: Fixing omap nand driver, compiled as module To: Linux MTD , linux-omap@vger.kernel.org Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 92573d5..ecc4d32 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1056,7 +1056,8 @@ out_free_info: static int omap_nand_remove(struct platform_device *pdev) { struct mtd_info *mtd = platform_get_drvdata(pdev); - struct omap_nand_info *info = mtd->priv; + struct omap_nand_info *info = container_of(mtd, struct omap_nand_info, + mtd); platform_set_drvdata(pdev, NULL); if (use_dma) @@ -1064,7 +1065,9 @@ static int omap_nand_remove(struct platform_device *pdev) /* Release NAND device, its internal structures and partitions */ nand_release(&info->mtd); + release_mem_region(info->phys_base, NAND_IO_SIZE); iounmap(info->nand_pref_fifo_add); + gpmc_cs_free(info->gpmc_cs); kfree(&info->mtd); return 0; }