diff options
author | Enrico Scholz <enrico.scholz@sigma-chemnitz.de> | 2008-08-29 06:59:50 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-09-01 16:37:51 -0400 |
commit | 7dad482ed0648a40e403d1ed44e0ea92248632f1 (patch) | |
tree | 609b0663fa6d240b19aaed3bc89ce598fff83513 /drivers/mtd | |
parent | 80ebf20f34c30760cfba7b5e0a418241181d2cd9 (diff) |
[MTD] [NAND] pxa3xx_nand: added some 'const' annotations to the exported API
This patch marks some attributes as 'const' which are set only once and
never be modified by the driver. There are some changes in parameter
list and variable declarations too which mark them as 'const'.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/pxa3xx_nand.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index e492804b3d98..af174054656e 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
@@ -293,7 +293,7 @@ static struct pxa3xx_nand_flash *builtin_flash_types[] = { | |||
293 | #define ns2cycle(ns, clk) (int)(((ns) * (clk / 1000000) / 1000) + 1) | 293 | #define ns2cycle(ns, clk) (int)(((ns) * (clk / 1000000) / 1000) + 1) |
294 | 294 | ||
295 | static void pxa3xx_nand_set_timing(struct pxa3xx_nand_info *info, | 295 | static void pxa3xx_nand_set_timing(struct pxa3xx_nand_info *info, |
296 | struct pxa3xx_nand_timing *t) | 296 | const struct pxa3xx_nand_timing *t) |
297 | { | 297 | { |
298 | unsigned long nand_clk = clk_get_rate(info->clk); | 298 | unsigned long nand_clk = clk_get_rate(info->clk); |
299 | uint32_t ndtr0, ndtr1; | 299 | uint32_t ndtr0, ndtr1; |
@@ -336,7 +336,7 @@ static int prepare_read_prog_cmd(struct pxa3xx_nand_info *info, | |||
336 | uint16_t cmd, int column, int page_addr) | 336 | uint16_t cmd, int column, int page_addr) |
337 | { | 337 | { |
338 | struct pxa3xx_nand_flash *f = info->flash_info; | 338 | struct pxa3xx_nand_flash *f = info->flash_info; |
339 | struct pxa3xx_nand_cmdset *cmdset = f->cmdset; | 339 | const struct pxa3xx_nand_cmdset *cmdset = f->cmdset; |
340 | 340 | ||
341 | /* calculate data size */ | 341 | /* calculate data size */ |
342 | switch (f->page_size) { | 342 | switch (f->page_size) { |
@@ -387,7 +387,7 @@ static int prepare_erase_cmd(struct pxa3xx_nand_info *info, | |||
387 | 387 | ||
388 | static int prepare_other_cmd(struct pxa3xx_nand_info *info, uint16_t cmd) | 388 | static int prepare_other_cmd(struct pxa3xx_nand_info *info, uint16_t cmd) |
389 | { | 389 | { |
390 | struct pxa3xx_nand_cmdset *cmdset = info->flash_info->cmdset; | 390 | const struct pxa3xx_nand_cmdset *cmdset = info->flash_info->cmdset; |
391 | 391 | ||
392 | info->ndcb0 = cmd | ((cmd & 0xff00) ? NDCB0_DBC : 0); | 392 | info->ndcb0 = cmd | ((cmd & 0xff00) ? NDCB0_DBC : 0); |
393 | info->ndcb1 = 0; | 393 | info->ndcb1 = 0; |
@@ -623,7 +623,7 @@ static void pxa3xx_nand_cmdfunc(struct mtd_info *mtd, unsigned command, | |||
623 | { | 623 | { |
624 | struct pxa3xx_nand_info *info = mtd->priv; | 624 | struct pxa3xx_nand_info *info = mtd->priv; |
625 | struct pxa3xx_nand_flash *flash_info = info->flash_info; | 625 | struct pxa3xx_nand_flash *flash_info = info->flash_info; |
626 | struct pxa3xx_nand_cmdset *cmdset = flash_info->cmdset; | 626 | const struct pxa3xx_nand_cmdset *cmdset = flash_info->cmdset; |
627 | int ret; | 627 | int ret; |
628 | 628 | ||
629 | info->use_dma = (use_dma) ? 1 : 0; | 629 | info->use_dma = (use_dma) ? 1 : 0; |
@@ -843,7 +843,7 @@ static int pxa3xx_nand_ecc_correct(struct mtd_info *mtd, | |||
843 | static int __readid(struct pxa3xx_nand_info *info, uint32_t *id) | 843 | static int __readid(struct pxa3xx_nand_info *info, uint32_t *id) |
844 | { | 844 | { |
845 | struct pxa3xx_nand_flash *f = info->flash_info; | 845 | struct pxa3xx_nand_flash *f = info->flash_info; |
846 | struct pxa3xx_nand_cmdset *cmdset = f->cmdset; | 846 | const struct pxa3xx_nand_cmdset *cmdset = f->cmdset; |
847 | uint32_t ndcr; | 847 | uint32_t ndcr; |
848 | uint8_t id_buff[8]; | 848 | uint8_t id_buff[8]; |
849 | 849 | ||