Skip to content

Commit

Permalink
mgmt: hawkbit: use K_WORK_DELAYABLE_DEFINE
Browse files Browse the repository at this point in the history
staticly init hawkbit_work_handle

Signed-off-by: Fin Maaß <[email protected]>
  • Loading branch information
maass-hamburg committed Apr 10, 2024
1 parent 731f8d4 commit 08391ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions subsys/mgmt/hawkbit/hawkbit.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ static union {
struct hawkbit_cancel cancel;
} hawkbit_results;

static struct k_work_delayable hawkbit_work_handle;
static void autohandler(struct k_work *work);

static K_WORK_DELAYABLE_DEFINE(hawkbit_work_handle, autohandler);

static struct k_sem probe_sem;

Expand Down Expand Up @@ -1238,6 +1240,5 @@ static void autohandler(struct k_work *work)

void hawkbit_autohandler(void)
{
k_work_init_delayable(&hawkbit_work_handle, autohandler);
k_work_reschedule(&hawkbit_work_handle, K_NO_WAIT);
}

0 comments on commit 08391ca

Please sign in to comment.