storage: flash_map: remove device_get_binding
Remove all usage of `device_get_binding` in the subsys by directly storing the `const struct device*` in the `struct flash_area`. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
parent
a6a9a35d0a
commit
4543f82c12
8 changed files with 17 additions and 45 deletions
|
@ -101,7 +101,6 @@ fcb_init(int f_area_id, struct fcb *fcb)
|
|||
int oldest = -1, newest = -1;
|
||||
struct flash_sector *oldest_sector = NULL, *newest_sector = NULL;
|
||||
struct fcb_disk_area fda;
|
||||
const struct device *dev = NULL;
|
||||
const struct flash_parameters *fparam;
|
||||
|
||||
if (!fcb->f_sectors || fcb->f_sector_cnt - fcb->f_scratch_cnt < 1) {
|
||||
|
@ -113,8 +112,7 @@ fcb_init(int f_area_id, struct fcb *fcb)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
dev = device_get_binding(fcb->fap->fa_dev_name);
|
||||
fparam = flash_get_parameters(dev);
|
||||
fparam = flash_get_parameters(fcb->fap->fa_dev);
|
||||
fcb->f_erase_value = fparam->erase_value;
|
||||
|
||||
align = fcb_get_align(fcb);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue