Commit edba8cc4f363112597466909e99b20a3b4469447
Committed by
Tom Rini
1 parent
bfdba68eac
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
common: use get_nand_dev_by_index()
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Showing 2 changed files with 4 additions and 3 deletions Side-by-side Diff
common/fb_nand.c
common/splash_source.c
... | ... | @@ -47,9 +47,10 @@ |
47 | 47 | #ifdef CONFIG_CMD_NAND |
48 | 48 | static int splash_nand_read_raw(u32 bmp_load_addr, int offset, size_t read_size) |
49 | 49 | { |
50 | - return nand_read_skip_bad(nand_info[nand_curr_device], offset, | |
50 | + struct mtd_info *mtd = get_nand_dev_by_index(nand_curr_device); | |
51 | + return nand_read_skip_bad(mtd, offset, | |
51 | 52 | &read_size, NULL, |
52 | - nand_info[nand_curr_device]->size, | |
53 | + mtd->size, | |
53 | 54 | (u_char *)bmp_load_addr); |
54 | 55 | } |
55 | 56 | #else |