Re: [PATCH 2/3] omap : nand : fix omap2 module reinsertion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 29, 2011 at 4:01 PM, Bryan DE FARIA
<bdefaria@xxxxxxxxxxxxxxxxxxx> wrote:
> When the module is removed, a reinsertion will fail with a -16 error.
>
> Signed-off-by: Bryan DE FARIA <bdefaria@xxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/mtd/nand/omap2.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
> index da9a351..eab51da 100644
> --- a/drivers/mtd/nand/omap2.c
> +++ b/drivers/mtd/nand/omap2.c
> @@ -1138,6 +1138,7 @@ 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);

I think using 'release_resource' would be better here. And you should
better do this after below 'iounmap' is done.

>        iounmap(info->nand.IO_ADDR_R);
>        kfree(&info->mtd);
>        return 0;
> --

-- 
Regards,
Vimal Singh
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux