From patchwork Wed Jan 6 14:05:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vimal singh X-Patchwork-Id: 42294 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 27862B6EEB for ; Thu, 7 Jan 2010 01:06:46 +1100 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NSWW3-00087r-Ti; Wed, 06 Jan 2010 14:05:39 +0000 Received: from mail-bw0-f212.google.com ([209.85.218.212]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NSWVw-0007v6-O5 for linux-mtd@lists.infradead.org; Wed, 06 Jan 2010 14:05:37 +0000 Received: by bwz4 with SMTP id 4so10832053bwz.2 for ; Wed, 06 Jan 2010 06:05:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:cc:content-type; bh=pYybEOZ251zpm7AhG8kwWx+7jHvoDoLLtzZtlLbzUM0=; b=nDqmJ6+pLPfdVojYnn+U8g16IxiuXdYy03FHkA3ZqOeGgJ/zXniuDDBqV3594A8U6h CUp0fDQ2mMMbDnbX0zylfT5g1334sxbniIJR79A6urcIgOaN/WAZjrZHFYvYofXI6scL PtooZswEkoojw535mzS+loDre5E6TXRCUnraY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:cc:content-type; b=JsineGA1JwvdpUzjLPshXVtMy+HslX072MPUiV3creDeD8VJA6czhZl7Mti6aL58QH CH1s4NmULFN6N41jdwoP6lWov7YybkyrrPFLhUc28rpJVmea4Fmc8bFFfXt25dbYiHBv hSNIwN5YavmvhnTB65z3TSmQvQYQy8aES8idc= MIME-Version: 1.0 Received: by 10.204.4.215 with SMTP id 23mr111424bks.160.1262786731203; Wed, 06 Jan 2010 06:05:31 -0800 (PST) From: Vimal Singh Date: Wed, 6 Jan 2010 19:35:11 +0530 Message-ID: Subject: [PATCH 2/3][NAND][OMAP]: correct 'info' pointer in 'omap_nand_remove' To: Linux MTD X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20100106_090532_928986_7BDBB4B8 X-CRM114-Status: GOOD ( 12.55 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- _SUMMARY_ Cc: linux-omap@vger.kernel.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From bf5256c8c29100c3a55e29a8a5d6718ba5817519 Mon Sep 17 00:00:00 2001 From: Vimal Singh Date: Tue, 5 Jan 2010 16:01:08 +0530 Subject: [PATCH] NAND: OMAP: correct 'info' pointer in 'omap_nand_remove' Removing OMAP NAND driver, when loaded as a module, gives error and does not get success. This fixes this and makes driver loadable and removable run time. Signed-off-by: Vimal Singh --- drivers/mtd/nand/omap2.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 4eea97c..16120e2 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1054,7 +1054,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)