mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-21 01:05:24 -04:00
net: ethernet: cortina: 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. Patch was created by using Coccinelle. Signed-off-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/ddbeac1e5d81df33e9cccb099f520111cb8ce9c4.1738746872.git.namcao@linutronix.de
This commit is contained in:
@@ -1833,9 +1833,8 @@ static int gmac_open(struct net_device *netdev)
|
||||
gmac_enable_tx_rx(netdev);
|
||||
netif_tx_start_all_queues(netdev);
|
||||
|
||||
hrtimer_init(&port->rx_coalesce_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
port->rx_coalesce_timer.function = &gmac_coalesce_delay_expired;
|
||||
hrtimer_setup(&port->rx_coalesce_timer, &gmac_coalesce_delay_expired, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
netdev_dbg(netdev, "opened\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user