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

Commit 495ad986 authored by Kees Cook's avatar Kees Cook Committed by David S. Miller
Browse files

net: amd8111e: 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: Eric Dumazet <edumazet@google.com>
Cc: Jarod Wilson <jarod@redhat.com>
Cc: Philippe Reynes <tremyfr@gmail.com>
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cacd2b3f
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -1669,9 +1669,9 @@ static int amd8111e_resume(struct pci_dev *pci_dev)
	return 0;
	return 0;
}
}


static void amd8111e_config_ipg(struct net_device *dev)
static void amd8111e_config_ipg(struct timer_list *t)
{
{
	struct amd8111e_priv *lp = netdev_priv(dev);
	struct amd8111e_priv *lp = from_timer(lp, t, ipg_data.ipg_timer);
	struct ipg_info *ipg_data = &lp->ipg_data;
	struct ipg_info *ipg_data = &lp->ipg_data;
	void __iomem *mmio = lp->mmio;
	void __iomem *mmio = lp->mmio;
	unsigned int prev_col_cnt = ipg_data->col_cnt;
	unsigned int prev_col_cnt = ipg_data->col_cnt;
@@ -1883,8 +1883,7 @@ static int amd8111e_probe_one(struct pci_dev *pdev,


	/* Initialize software ipg timer */
	/* Initialize software ipg timer */
	if(lp->options & OPTION_DYN_IPG_ENABLE){
	if(lp->options & OPTION_DYN_IPG_ENABLE){
		setup_timer(&lp->ipg_data.ipg_timer,
		timer_setup(&lp->ipg_data.ipg_timer, amd8111e_config_ipg, 0);
			    (void *)&amd8111e_config_ipg, (unsigned long)dev);
		lp->ipg_data.ipg_timer.expires = jiffies +
		lp->ipg_data.ipg_timer.expires = jiffies +
						 IPG_CONVERGE_JIFFIES;
						 IPG_CONVERGE_JIFFIES;
		lp->ipg_data.ipg = DEFAULT_IPG;
		lp->ipg_data.ipg = DEFAULT_IPG;