canbus: canopen: Fix broken CANOPEN_STORAGE_HANDLER_ERASES_EEPROM ref.

Missing CONFIG_ prefix in #ifdef, leading to some dead code.

Found by scripts/kconfig/lint.py, which flagged it as unused.

Piggyback removal of a redundant 'default n'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
Ulf Magnusson 2020-01-25 01:04:06 +01:00 committed by Anas Nashif
parent 0618cf00e8
commit 11eb3b6c4f
2 changed files with 1 additions and 2 deletions

View file

@ -60,7 +60,6 @@ config CANOPEN_STORAGE
config CANOPEN_STORAGE_HANDLER_ERASES_EEPROM
bool "Erase CANopen object dictionary EEPROM entries in storage handler"
depends on CANOPEN_STORAGE
default n
help
Erase CANopen object dictionary EEPROM entries upon write to
object dictionary index 0x1011 subindex 1.

View file

@ -100,7 +100,7 @@ static CO_SDO_abortCode_t canopen_odf_1011(CO_ODF_arg_t *odf_arg)
LOG_DBG("deleted object dictionary ROM entries");
}
#ifdef CANOPEN_STORAGE_HANDLER_ERASES_EEPROM
#ifdef CONFIG_CANOPEN_STORAGE_HANDLER_ERASES_EEPROM
err = canopen_storage_erase(CANOPEN_STORAGE_EEPROM);
if (err == -ENOENT) {
LOG_DBG("no object dictionary EEPROM entries to delete");