settings: use nvs_mount
Replace deprecated nvs_init() with nvs_mount(). Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
252053f4fe
commit
f07430349b
1 changed files with 6 additions and 1 deletions
|
|
@ -245,7 +245,12 @@ int settings_nvs_backend_init(struct settings_nvs *cf)
|
|||
int rc;
|
||||
uint16_t last_name_id;
|
||||
|
||||
rc = nvs_init(&cf->cf_nvs, cf->flash_dev_name);
|
||||
cf->cf_nvs.flash_device = device_get_binding(cf->flash_dev_name);
|
||||
if (cf->cf_nvs.flash_device == NULL) {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
rc = nvs_mount(&cf->cf_nvs);
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue