bluetooth: mesh: health_srv: update k_work API

Switch to new work API.  Avoid a racy cancel by allowing the work
handler to deal with an immediate off when the time remaining changes
to zero.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2021-03-08 12:44:37 -06:00 committed by Johan Hedberg
commit 81b9ba3a9b
2 changed files with 11 additions and 17 deletions

View file

@ -153,7 +153,7 @@ struct bt_mesh_health_srv {
const struct bt_mesh_health_srv_cb *cb;
/** Attention Timer state */
struct k_delayed_work attn_timer;
struct k_work_delayable attn_timer;
};
/** @def BT_MESH_MODEL_HEALTH_SRV