[PATCH] mtd: sh_flctl: add support for Renesas SuperH FLCTL

Paul Mundt lethal at linux-sh.org
Wed Sep 17 10:57:32 EDT 2008


On Tue, Sep 09, 2008 at 05:00:30PM +0900, Yoshihiro Shimoda wrote:
> Several Renesas SuperH CPU has FLCTL. The FLCTL support NAND Flash.
> This driver support SH7723.
> 
> Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro at renesas.com>

> +	flctl->reg = ioremap(res->start, res->end - res->start);
> +	if (flctl->reg == NULL) {
> +		printk(KERN_ERR "%s: ioremap error.\n", __func__);
> +		ret = -ENOMEM;
> +		goto err;
> +	}
> +
You have an off-by-1 here, this wants to be res->end - res->start + 1.

Other than that, it looks ok to me at first glance.

Acked-by: Paul Mundt <lethal at linux-sh.org>



More information about the linux-mtd mailing list