[PATCH] mtd: OneNAND: Fix wrong subpage_sft at 4KiB pagesize

Artem Bityutskiy dedekind1 at gmail.com
Fri Jun 3 11:41:41 EDT 2011


On Thu, 2011-06-02 at 15:48 +0900, Kyungmin Park wrote:
> From: Kyungmin Park <kyungmin.park at samsung.com>
> 
> There's no case to use the subpage for 4KiB pagesize.
> 
> Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
> ---
> diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
> index ac9e959..337be7c 100644
> --- a/drivers/mtd/onenand/onenand_base.c
> +++ b/drivers/mtd/onenand/onenand_base.c
> @@ -4047,13 +4047,11 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
>  	 */
>  	switch (mtd->oobsize) {
>  	case 128:
> -		if (FLEXONENAND(this)) {
> +		if (FLEXONENAND(this))
>  			this->ecclayout = &flexonenand_oob_128;
> -			mtd->subpage_sft = 0;
> -		} else {
> +		else
>  			this->ecclayout = &onenand_oob_128;
> -			mtd->subpage_sft = 2;
> -		}
> +		mtd->subpage_sft = 0;
>  		break;
>  	case 64:
>  		this->ecclayout = &onenand_oob_64;

Roman, are you happy with this change?

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




More information about the linux-mtd mailing list