summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/dec/tulip/dmfe.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-16 17:29:05 -0700
committerDavid S. Miller <davem@davemloft.net>2017-10-18 12:39:38 +0100
commita8c22a2bbc67d001479696c5696ae11c84116701 (patch)
tree4bba51279aad66c66275010b7013d5b9d6deee96 /drivers/net/ethernet/dec/tulip/dmfe.c
parent3d2ceaa63b81f41cd95e8954555130cc801c4452 (diff)
downloadlinux-a8c22a2bbc67d001479696c5696ae11c84116701.tar.bz2
net: tulip: 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: David Howells <dhowells@redhat.com> Cc: Jarod Wilson <jarod@redhat.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Cc: Johannes Berg <johannes.berg@intel.com> Cc: Eric Dumazet <edumazet@google.com> Cc: Philippe Reynes <tremyfr@gmail.com> Cc: "yuval.shaia@oracle.com" <yuval.shaia@oracle.com> Cc: netdev@vger.kernel.org Cc: linux-parisc@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/dec/tulip/dmfe.c')
-rw-r--r--drivers/net/ethernet/dec/tulip/dmfe.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/dec/tulip/dmfe.c b/drivers/net/ethernet/dec/tulip/dmfe.c
index 6585f737d08b..17ef7a28873d 100644
--- a/drivers/net/ethernet/dec/tulip/dmfe.c
+++ b/drivers/net/ethernet/dec/tulip/dmfe.c
@@ -331,7 +331,7 @@ static void dmfe_phy_write_1bit(void __iomem *, u32);
static u16 dmfe_phy_read_1bit(void __iomem *);
static u8 dmfe_sense_speed(struct dmfe_board_info *);
static void dmfe_process_mode(struct dmfe_board_info *);
-static void dmfe_timer(unsigned long);
+static void dmfe_timer(struct timer_list *);
static inline u32 cal_CRC(unsigned char *, unsigned int, u8);
static void dmfe_rx_packet(struct net_device *, struct dmfe_board_info *);
static void dmfe_free_tx_pkt(struct net_device *, struct dmfe_board_info *);
@@ -596,7 +596,7 @@ static int dmfe_open(struct net_device *dev)
netif_wake_queue(dev);
/* set and active a timer process */
- setup_timer(&db->timer, dmfe_timer, (unsigned long)dev);
+ timer_setup(&db->timer, dmfe_timer, 0);
db->timer.expires = DMFE_TIMER_WUT + HZ * 2;
add_timer(&db->timer);
@@ -1128,10 +1128,10 @@ static const struct ethtool_ops netdev_ethtool_ops = {
* Dynamic media sense, allocate Rx buffer...
*/
-static void dmfe_timer(unsigned long data)
+static void dmfe_timer(struct timer_list *t)
{
- struct net_device *dev = (struct net_device *)data;
- struct dmfe_board_info *db = netdev_priv(dev);
+ struct dmfe_board_info *db = from_timer(db, t, timer);
+ struct net_device *dev = pci_get_drvdata(db->pdev);
void __iomem *ioaddr = db->ioaddr;
u32 tmp_cr8;
unsigned char tmp_cr12;