drivers: flash: Do not unlock CR at the end of initialization
Unlocking CR at the end of initialization was added in commita9183cd518. It was probably copied from previous flash driver implementation. Unlocking and locking CR in write and erase functions was added in commit6e4cdb0c99. Since we always unlock the register before writing or erasing, and lock it after the operation is finished, there is no need to unlock it after initialization. Signed-off-by: Patryk Duda <pdk@semihalf.com>
This commit is contained in:
parent
f3b0a8f478
commit
b9f495282e
@ -396,7 +396,7 @@ static int stm32_flash_init(const struct device *dev)
|
||||
}
|
||||
#endif
|
||||
|
||||
return flash_stm32_write_protection(dev, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEVICE_DT_INST_DEFINE(0, stm32_flash_init, NULL,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user