Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Nam Cao and committed by
Thomas Gleixner
dbf13c42 7b63b1dc

+2 -2
+2 -2
drivers/net/ieee802154/at86rf230.c
··· 776 776 state->trx.tx_buf = state->buf; 777 777 state->trx.rx_buf = state->buf; 778 778 spi_message_add_tail(&state->trx, &state->msg); 779 - hrtimer_init(&state->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 780 - state->timer.function = at86rf230_async_state_timer; 779 + hrtimer_setup(&state->timer, at86rf230_async_state_timer, CLOCK_MONOTONIC, 780 + HRTIMER_MODE_REL); 781 781 } 782 782 783 783 static irqreturn_t at86rf230_isr(int irq, void *data)