提交 1556770a 编写于 作者: K Kees Cook 提交者: David S. Miller

drivers/net: tundra: Convert timers to use timer_setup()

In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Philippe Reynes <tremyfr@gmail.com>
Cc: "yuval.shaia@oracle.com" <yuval.shaia@oracle.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: netdev@vger.kernel.org
Signed-off-by: NKees Cook <keescook@chromium.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2fd2f61e
......@@ -164,7 +164,7 @@ static struct platform_driver tsi_eth_driver = {
},
};
static void tsi108_timed_checker(unsigned long dev_ptr);
static void tsi108_timed_checker(struct timer_list *t);
#ifdef DEBUG
static void dump_eth_one(struct net_device *dev)
......@@ -1370,7 +1370,7 @@ static int tsi108_open(struct net_device *dev)
napi_enable(&data->napi);
setup_timer(&data->timer, tsi108_timed_checker, (unsigned long)dev);
timer_setup(&data->timer, tsi108_timed_checker, 0);
mod_timer(&data->timer, jiffies + 1);
tsi108_restart_rx(data, dev);
......@@ -1666,10 +1666,10 @@ tsi108_init_one(struct platform_device *pdev)
* Thus, we have to do it using a timer.
*/
static void tsi108_timed_checker(unsigned long dev_ptr)
static void tsi108_timed_checker(struct timer_list *t)
{
struct net_device *dev = (struct net_device *)dev_ptr;
struct tsi108_prv_data *data = netdev_priv(dev);
struct tsi108_prv_data *data = from_timer(data, t, timer);
struct net_device *dev = data->dev;
tsi108_check_phy(dev);
tsi108_check_rxring(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册