From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <49D5B351.5040601@nokia.com> Date: Fri, 03 Apr 2009 09:57:21 +0300 From: Adrian Hunter MIME-Version: 1.0 To: Kevin Cernekee Subject: Re: [PATCH] MTD: nandsim should delete its partitions on module unload References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "linux-mtd@lists.infradead.org" , "dwmw2@infradead.org" , "linux-kernel@vger.kernel.org" List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Kevin Cernekee wrote: > Signed-off-by: Kevin Cernekee > --- > drivers/mtd/nand/nandsim.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c > index cd0711b..f4fda9b 100644 > --- a/drivers/mtd/nand/nandsim.c > +++ b/drivers/mtd/nand/nandsim.c > @@ -2349,6 +2349,7 @@ static void __exit ns_cleanup_module(void) > struct nandsim *ns = (struct nandsim *)(((struct nand_chip > *)nsmtd->priv)->priv); > int i; > > + del_mtd_partitions(nsmtd); > free_nandsim(ns); /* Free nandsim private resources */ > nand_release(nsmtd); /* Unregister driver */ > for (i = 0;i < ARRAY_SIZE(ns->partitions); ++i) Doesn't nand_release() already do that?