storage/flash_map: API for get driver belongs to the flash_area.
Introduce API for get driver structure belongs to the flash_area. Some more complex operation on flash areas might want to be done using driver directly. It not make sense to wrap every possible flash related operation by flash_map API. For instance mcuboot will require this patch. Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This commit is contained in:
parent
2320973fea
commit
3fe98838c9
2 changed files with 14 additions and 0 deletions
|
@ -247,3 +247,8 @@ int flash_area_has_driver(const struct flash_area *fa)
|
|||
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct device *flash_area_get_device(const struct flash_area *fa)
|
||||
{
|
||||
return device_get_binding(fa->fa_dev_name);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue