public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] MTD: nandsim should delete its partitions on module unload
@ 2009-04-02 23:32 Kevin Cernekee
  2009-04-03  6:57 ` Adrian Hunter
  2009-04-03  7:01 ` Artem Bityutskiy
  0 siblings, 2 replies; 4+ messages in thread
From: Kevin Cernekee @ 2009-04-02 23:32 UTC (permalink / raw)
  To: dwmw2; +Cc: linux-mtd, linux-kernel

Signed-off-by: Kevin Cernekee <kpc.mtd@gmail.com>
---
 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)
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] MTD: nandsim should delete its partitions on module unload
  2009-04-02 23:32 [PATCH] MTD: nandsim should delete its partitions on module unload Kevin Cernekee
@ 2009-04-03  6:57 ` Adrian Hunter
  2009-04-03 20:20   ` Kevin Cernekee
  2009-04-03  7:01 ` Artem Bityutskiy
  1 sibling, 1 reply; 4+ messages in thread
From: Adrian Hunter @ 2009-04-03  6:57 UTC (permalink / raw)
  To: Kevin Cernekee
  Cc: linux-mtd@lists.infradead.org, dwmw2@infradead.org,
	linux-kernel@vger.kernel.org

Kevin Cernekee wrote:
> Signed-off-by: Kevin Cernekee <kpc.mtd@gmail.com>
> ---
>  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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] MTD: nandsim should delete its partitions on module unload
  2009-04-02 23:32 [PATCH] MTD: nandsim should delete its partitions on module unload Kevin Cernekee
  2009-04-03  6:57 ` Adrian Hunter
@ 2009-04-03  7:01 ` Artem Bityutskiy
  1 sibling, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2009-04-03  7:01 UTC (permalink / raw)
  To: Kevin Cernekee; +Cc: linux-mtd, dwmw2, linux-kernel

On Thu, 2009-04-02 at 16:32 -0700, Kevin Cernekee wrote:
> Signed-off-by: Kevin Cernekee <kpc.mtd@gmail.com>
> ---
>  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);
The patch is line-wrapped.

>  	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)

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] MTD: nandsim should delete its partitions on module unload
  2009-04-03  6:57 ` Adrian Hunter
@ 2009-04-03 20:20   ` Kevin Cernekee
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Cernekee @ 2009-04-03 20:20 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: linux-mtd@lists.infradead.org, dwmw2@infradead.org,
	linux-kernel@vger.kernel.org

On Thu, Apr 2, 2009 at 11:57 PM, Adrian Hunter <adrian.hunter@nokia.com> wrote:
> Doesn't nand_release() already do that?

Yes.  The problem I was seeing (attempt to reregister mtd* sysfs
entries) was caused by something else.  I retract the patch.

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-03 20:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-02 23:32 [PATCH] MTD: nandsim should delete its partitions on module unload Kevin Cernekee
2009-04-03  6:57 ` Adrian Hunter
2009-04-03 20:20   ` Kevin Cernekee
2009-04-03  7:01 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox