From 959f67b146c95f70da9588e1238662d0a5aeb9c2 Mon Sep 17 00:00:00 2001 From: Pieter De Gendt Date: Tue, 3 Dec 2024 15:31:38 +0100 Subject: [PATCH] doc: kernel: drivers: Remove assert using DEVICE_API The initial proposal had the assert included, however this could break downstream users and it was opted to not add assert in the driver API calls. Update the documented example to reflect that. Signed-off-by: Pieter De Gendt --- doc/kernel/drivers/index.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/kernel/drivers/index.rst b/doc/kernel/drivers/index.rst index 91255fa347b..07069942557 100644 --- a/doc/kernel/drivers/index.rst +++ b/doc/kernel/drivers/index.rst @@ -144,15 +144,11 @@ A subsystem API definition typically looks like this: static inline int subsystem_do_this(const struct device *dev, int foo, int bar) { - __ASSERT_NO_MSG(DEVICE_API_IS(subsystem, dev)); - return DEVICE_API_GET(subsystem, dev)->do_this(dev, foo, bar); } static inline void subsystem_do_that(const struct device *dev, void *baz) { - __ASSERT_NO_MSG(DEVICE_API_IS(subsystem, dev)); - DEVICE_API_GET(subsystem, dev)->do_that(dev, baz); }