Skip to content

Commit 495ad98

Browse files
keesdavem330
authored andcommitted
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" <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: Jarod Wilson <[email protected]> Cc: Philippe Reynes <[email protected]> Cc: [email protected] Signed-off-by: Kees Cook <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cacd2b3 commit 495ad98

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/net/ethernet/amd/amd8111e.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,9 +1669,9 @@ static int amd8111e_resume(struct pci_dev *pci_dev)
16691669
return 0;
16701670
}
16711671

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

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

0 commit comments

Comments
 (0)