Skip to content

Commit

Permalink
drivers: net: appletalk: cops: use setup_timer() helper.
Browse files Browse the repository at this point in the history
Use setup_timer function instead of initializing timer with the
    function and data fields.

Signed-off-by: Allen Pais <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Allen Pais authored and davem330 committed Sep 21, 2017
1 parent 07b6901 commit 1e153e5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/appletalk/cops.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,7 @@ static int cops_open(struct net_device *dev)
*/
if(lp->board==TANGENT) /* Poll 20 times per second */
{
init_timer(&cops_timer);
cops_timer.function = cops_poll;
cops_timer.data = (unsigned long)dev;
setup_timer(&cops_timer, cops_poll, (unsigned long)dev);
cops_timer.expires = jiffies + HZ/20;
add_timer(&cops_timer);
}
Expand Down

0 comments on commit 1e153e5

Please sign in to comment.