mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-07-07 23:11:47 +00:00
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>
This commit is contained in:
parent
bfdba68eac
commit
edba8cc4f3
2 changed files with 4 additions and 3 deletions
|
@ -59,7 +59,7 @@ static int fb_nand_lookup(const char *partname,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
*mtd = nand_info[dev->id->num];
|
*mtd = get_nand_dev_by_index(dev->id->num);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,9 +47,10 @@ static int splash_sf_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
|
||||||
#ifdef CONFIG_CMD_NAND
|
#ifdef CONFIG_CMD_NAND
|
||||||
static int splash_nand_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
|
static int splash_nand_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
|
||||||
{
|
{
|
||||||
return nand_read_skip_bad(nand_info[nand_curr_device], offset,
|
struct mtd_info *mtd = get_nand_dev_by_index(nand_curr_device);
|
||||||
|
return nand_read_skip_bad(mtd, offset,
|
||||||
&read_size, NULL,
|
&read_size, NULL,
|
||||||
nand_info[nand_curr_device]->size,
|
mtd->size,
|
||||||
(u_char *)bmp_load_addr);
|
(u_char *)bmp_load_addr);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue