net: ieee802154: at86rf230: Switch to use hrtimer_setup()

hrtimer_setup() takes the callback function pointer as argument and
initializes the timer completely.

Replace hrtimer_init() and the open coded initialization of
hrtimer::function with the new setup mechanism.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/9f701c1b64e248539772aee62e130a7e50bbf1b0.1738746872.git.namcao@linutronix.de
This commit is contained in:
Nam Cao 2025-02-05 11:43:33 +01:00 committed by Thomas Gleixner
parent 7b63b1dc47
commit dbf13c4278
1 changed files with 2 additions and 2 deletions

View File

@ -776,8 +776,8 @@ at86rf230_setup_spi_messages(struct at86rf230_local *lp,
state->trx.tx_buf = state->buf;
state->trx.rx_buf = state->buf;
spi_message_add_tail(&state->trx, &state->msg);
hrtimer_init(&state->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
state->timer.function = at86rf230_async_state_timer;
hrtimer_setup(&state->timer, at86rf230_async_state_timer, CLOCK_MONOTONIC,
HRTIMER_MODE_REL);
}
static irqreturn_t at86rf230_isr(int irq, void *data)