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 <pieter.degendt@basalte.be>
This commit is contained in:
parent
537b52e7fe
commit
959f67b146
1 changed files with 0 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue