소스 검색

mtd/dataflash.c: fix a problem with the last partition

This patch fix the problem that only the [NB_DATAFLASH_AREA - 1] dataflash
partition can be defined to use the area to the end of dataflash size.
Now it is possible to have only one dataflash partition from 0 to the end
of of dataflash size.

Signed-off-by: Ilko Iliev <iliev@ronetix.at>
Ilko Iliev 16 년 전
부모
커밋
bd876772ee
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/mtd/dataflash.c

+ 1 - 1
drivers/mtd/dataflash.c

@@ -131,7 +131,7 @@ int AT91F_DataflashInit (void)
 			break;
 		}
 		/* set the last area end to the dataflash size*/
-		area_list[NB_DATAFLASH_AREA - 1].end =
+		dataflash_info[i].end_address =
 				(dataflash_info[i].Device.pages_number *
 				dataflash_info[i].Device.pages_size) - 1;