Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68497a87 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller
Browse files

net: dsa: mv88e6xxx: use setup_timer to simplify the code



Use setup_timer function instead of initializing timer with the function
and data fields.

Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1aaa87af
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -639,9 +639,8 @@ static void mv88e6xxx_ppu_state_init(struct mv88e6xxx_chip *chip)
{
{
	mutex_init(&chip->ppu_mutex);
	mutex_init(&chip->ppu_mutex);
	INIT_WORK(&chip->ppu_work, mv88e6xxx_ppu_reenable_work);
	INIT_WORK(&chip->ppu_work, mv88e6xxx_ppu_reenable_work);
	init_timer(&chip->ppu_timer);
	setup_timer(&chip->ppu_timer, mv88e6xxx_ppu_reenable_timer,
	chip->ppu_timer.data = (unsigned long)chip;
		    (unsigned long)chip);
	chip->ppu_timer.function = mv88e6xxx_ppu_reenable_timer;
}
}


static void mv88e6xxx_ppu_state_destroy(struct mv88e6xxx_chip *chip)
static void mv88e6xxx_ppu_state_destroy(struct mv88e6xxx_chip *chip)