drivers: can: mcp2515: do not force CONFIG_CAN_AUTO_BUS_OFF_RECOVERY=y

Do not force CONFIG_CAN_AUTO_BUS_OFF_RECOVERY=y. Instead fix the return
type of the mcp2515_recover() function and return -ENOTSUP.

Fixes: #44344

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2022-03-30 11:32:38 +02:00 committed by Carles Cufí
commit 6f910ae41e
2 changed files with 3 additions and 2 deletions

View file

@ -6,7 +6,6 @@
config CAN_MCP2515
bool "MCP2515 CAN Driver"
depends on SPI
select CAN_AUTO_BUS_OFF_RECOVERY
help
Enable MCP2515 CAN Driver

View file

@ -736,10 +736,12 @@ static void mcp2515_handle_errors(const struct device *dev)
}
#ifndef CONFIG_CAN_AUTO_BUS_OFF_RECOVERY
static void mcp2515_recover(const struct device *dev, k_timeout_t timeout)
static int mcp2515_recover(const struct device *dev, k_timeout_t timeout)
{
ARG_UNUSED(dev);
ARG_UNUSED(timeout);
return -ENOTSUP;
}
#endif