]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: qualcomm: rmnet: Switch to use hrtimer_setup()
authorNam Cao <namcao@linutronix.de>
Wed, 5 Feb 2025 10:43:35 +0000 (11:43 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 18 Feb 2025 09:35:46 +0000 (10:35 +0100)
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/4312885d95fc99053b2c285f74cc83a852c03f4a.1738746872.git.namcao@linutronix.de
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c

index a5e3d1a88305ec36982712ca0022e3b9ce4739c4..8b4640c5d61ebe854ae54ec7decf649d50097f1a 100644 (file)
@@ -686,8 +686,8 @@ void rmnet_map_update_ul_agg_config(struct rmnet_port *port, u32 size,
 
 void rmnet_map_tx_aggregate_init(struct rmnet_port *port)
 {
-       hrtimer_init(&port->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
-       port->hrtimer.function = rmnet_map_flush_tx_packet_queue;
+       hrtimer_setup(&port->hrtimer, rmnet_map_flush_tx_packet_queue, CLOCK_MONOTONIC,
+                     HRTIMER_MODE_REL);
        spin_lock_init(&port->agg_lock);
        rmnet_map_update_ul_agg_config(port, 4096, 1, 800);
        INIT_WORK(&port->agg_wq, rmnet_map_flush_tx_packet_work);