* [PATCH 1/2] mtd: pxa3xx_nand: fix a memory leak
@ 2011-06-03 5:14 Axel Lin
2011-06-03 5:15 ` [PATCH 2/2] mtd: fsmc_nand: " Axel Lin
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Axel Lin @ 2011-06-03 5:14 UTC (permalink / raw)
To: linux-kernel
Cc: Haojian Zhuang, Eric Miao, Artem Bityutskiy, David Woodhouse, linux-mtd
In pxa3xx_nand_remove, we should call nand_release instead of
mtd_device_unregister to properly free bad block table memory
and bad block descriptor memory.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/mtd/nand/pxa3xx_nand.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index 1fb3b3a..f7040ea 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1119,7 +1119,7 @@ static int pxa3xx_nand_remove(struct platform_device *pdev)
clk_put(info->clk);
if (mtd) {
- mtd_device_unregister(mtd);
+ nand_release(mtd);
kfree(mtd);
}
return 0;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] mtd: fsmc_nand: fix a memory leak
2011-06-03 5:14 [PATCH 1/2] mtd: pxa3xx_nand: fix a memory leak Axel Lin
@ 2011-06-03 5:15 ` Axel Lin
2011-06-03 13:02 ` [PATCH 1/2] mtd: pxa3xx_nand: " Daniel Mack
2011-06-06 10:19 ` Artem Bityutskiy
2 siblings, 0 replies; 5+ messages in thread
From: Axel Lin @ 2011-06-03 5:15 UTC (permalink / raw)
To: linux-kernel
Cc: Viresh Kumar, Linus Walleij, Shiraz Hashim, David Woodhouse,
Artem Bityutskiy, linux-mtd
In fsmc_nand_remove, we should call nand_release instead of
mtd_device_unregister to properly free bad block table memory
and bad block descriptor memory.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/mtd/nand/fsmc_nand.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index e9b275a..8a5f1aa 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -822,7 +822,7 @@ static int fsmc_nand_remove(struct platform_device *pdev)
platform_set_drvdata(pdev, NULL);
if (host) {
- mtd_device_unregister(&host->mtd);
+ nand_release(&host->mtd);
clk_disable(host->clk);
clk_put(host->clk);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] mtd: pxa3xx_nand: fix a memory leak
2011-06-03 5:14 [PATCH 1/2] mtd: pxa3xx_nand: fix a memory leak Axel Lin
2011-06-03 5:15 ` [PATCH 2/2] mtd: fsmc_nand: " Axel Lin
@ 2011-06-03 13:02 ` Daniel Mack
2011-06-03 15:58 ` Lei Wen
2011-06-06 10:19 ` Artem Bityutskiy
2 siblings, 1 reply; 5+ messages in thread
From: Daniel Mack @ 2011-06-03 13:02 UTC (permalink / raw)
To: Axel Lin
Cc: linux-kernel, Haojian Zhuang, Eric Miao, Artem Bityutskiy,
David Woodhouse, linux-mtd, Lei Wen
(Cc Lei Wen)
On Fri, Jun 3, 2011 at 7:14 AM, Axel Lin <axel.lin@gmail.com> wrote:
> In pxa3xx_nand_remove, we should call nand_release instead of
> mtd_device_unregister to properly free bad block table memory
> and bad block descriptor memory.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
> drivers/mtd/nand/pxa3xx_nand.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
> index 1fb3b3a..f7040ea 100644
> --- a/drivers/mtd/nand/pxa3xx_nand.c
> +++ b/drivers/mtd/nand/pxa3xx_nand.c
> @@ -1119,7 +1119,7 @@ static int pxa3xx_nand_remove(struct platform_device *pdev)
> clk_put(info->clk);
>
> if (mtd) {
> - mtd_device_unregister(mtd);
> + nand_release(mtd);
> kfree(mtd);
> }
> return 0;
> --
> 1.7.4.1
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] mtd: pxa3xx_nand: fix a memory leak
2011-06-03 13:02 ` [PATCH 1/2] mtd: pxa3xx_nand: " Daniel Mack
@ 2011-06-03 15:58 ` Lei Wen
0 siblings, 0 replies; 5+ messages in thread
From: Lei Wen @ 2011-06-03 15:58 UTC (permalink / raw)
To: Daniel Mack
Cc: Axel Lin, linux-kernel, Haojian Zhuang, Eric Miao,
Artem Bityutskiy, David Woodhouse, linux-mtd
On Fri, Jun 3, 2011 at 9:02 PM, Daniel Mack <zonque@gmail.com> wrote:
> (Cc Lei Wen)
>
> On Fri, Jun 3, 2011 at 7:14 AM, Axel Lin <axel.lin@gmail.com> wrote:
>> In pxa3xx_nand_remove, we should call nand_release instead of
>> mtd_device_unregister to properly free bad block table memory
>> and bad block descriptor memory.
>>
>> Signed-off-by: Axel Lin <axel.lin@gmail.com>
>> ---
>> drivers/mtd/nand/pxa3xx_nand.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
>> index 1fb3b3a..f7040ea 100644
>> --- a/drivers/mtd/nand/pxa3xx_nand.c
>> +++ b/drivers/mtd/nand/pxa3xx_nand.c
>> @@ -1119,7 +1119,7 @@ static int pxa3xx_nand_remove(struct platform_device *pdev)
>> clk_put(info->clk);
>>
>> if (mtd) {
>> - mtd_device_unregister(mtd);
>> + nand_release(mtd);
>> kfree(mtd);
>> }
>> return 0;
>> --
>> 1.7.4.1
>>
Acked-by: Lei Wen <leiwen@marvell.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] mtd: pxa3xx_nand: fix a memory leak
2011-06-03 5:14 [PATCH 1/2] mtd: pxa3xx_nand: fix a memory leak Axel Lin
2011-06-03 5:15 ` [PATCH 2/2] mtd: fsmc_nand: " Axel Lin
2011-06-03 13:02 ` [PATCH 1/2] mtd: pxa3xx_nand: " Daniel Mack
@ 2011-06-06 10:19 ` Artem Bityutskiy
2 siblings, 0 replies; 5+ messages in thread
From: Artem Bityutskiy @ 2011-06-06 10:19 UTC (permalink / raw)
To: Axel Lin
Cc: linux-kernel, David Woodhouse, Eric Miao, Haojian Zhuang, linux-mtd
On Fri, 2011-06-03 at 13:14 +0800, Axel Lin wrote:
> In pxa3xx_nand_remove, we should call nand_release instead of
> mtd_device_unregister to properly free bad block table memory
> and bad block descriptor memory.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Pushed to l2-mtd-2.6.git, thanks!
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-06-06 10:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-03 5:14 [PATCH 1/2] mtd: pxa3xx_nand: fix a memory leak Axel Lin
2011-06-03 5:15 ` [PATCH 2/2] mtd: fsmc_nand: " Axel Lin
2011-06-03 13:02 ` [PATCH 1/2] mtd: pxa3xx_nand: " Daniel Mack
2011-06-03 15:58 ` Lei Wen
2011-06-06 10:19 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).