Skip to content

Commit 9d76a63

Browse files
yvesllnashif
authored andcommitted
drivers: watchdog: cop: ignore unused parameter
In install timeout api, the cfg parameter does not make sense to cop, we can ignore it rather than return an error code to keep forward compatibility. Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
1 parent c8d9011 commit 9d76a63

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/watchdog/wdt_mcux_cop.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (c) 2025 Alexandre Rey
3+
* Copyright 2025 NXP
34
*
45
* Based on wdt_mcux_rtwdog.c, which is:
56
* Copyright 2024, NXP
@@ -107,10 +108,8 @@ static int mcux_cop_install_timeout(const struct device *dev, const struct wdt_t
107108
const struct mcux_cop_config *config = dev->config;
108109
struct mcux_cop_data *data = dev->data;
109110

110-
if (cfg != NULL) {
111-
LOG_ERR("Watchdog only configurable via Device Tree, cfg parameter must be NULL");
112-
return -ENOTSUP;
113-
}
111+
/* Watchdog only configurable via Device Tree, cfg parameter does not make sense here. */
112+
ARG_UNUSED(cfg);
114113

115114
COP_GetDefaultConfig(&data->cop_config);
116115

0 commit comments

Comments
 (0)