提交 68497a87 编写于 作者: W Wei Yongjun 提交者: David S. Miller

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: NWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1aaa87af
......@@ -639,9 +639,8 @@ static void mv88e6xxx_ppu_state_init(struct mv88e6xxx_chip *chip)
{
mutex_init(&chip->ppu_mutex);
INIT_WORK(&chip->ppu_work, mv88e6xxx_ppu_reenable_work);
init_timer(&chip->ppu_timer);
chip->ppu_timer.data = (unsigned long)chip;
chip->ppu_timer.function = mv88e6xxx_ppu_reenable_timer;
setup_timer(&chip->ppu_timer, mv88e6xxx_ppu_reenable_timer,
(unsigned long)chip);
}
static void mv88e6xxx_ppu_state_destroy(struct mv88e6xxx_chip *chip)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册