]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - drivers/net/slip/slip.c
treewide: setup_timer() -> timer_setup()
[thirdparty/linux.git] / drivers / net / slip / slip.c
index eb8a18991d8c7c78c45ba828b79479263acbf1a9..cc63102ca96e0056ac8f1755c5b43b7bd878ccf0 100644 (file)
@@ -106,8 +106,8 @@ static int slip_esc6(unsigned char *p, unsigned char *d, int len);
 static void slip_unesc6(struct slip *sl, unsigned char c);
 #endif
 #ifdef CONFIG_SLIP_SMART
-static void sl_keepalive(unsigned long sls);
-static void sl_outfill(unsigned long sls);
+static void sl_keepalive(struct timer_list *t);
+static void sl_outfill(struct timer_list *t);
 static int sl_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 #endif
 
@@ -763,8 +763,8 @@ static struct slip *sl_alloc(dev_t line)
        sl->mode        = SL_MODE_DEFAULT;
 #ifdef CONFIG_SLIP_SMART
        /* initialize timer_list struct */
-       setup_timer(&sl->keepalive_timer, sl_keepalive, (unsigned long)sl);
-       setup_timer(&sl->outfill_timer, sl_outfill, (unsigned long)sl);
+       timer_setup(&sl->keepalive_timer, sl_keepalive, 0);
+       timer_setup(&sl->outfill_timer, sl_outfill, 0);
 #endif
        slip_devs[i] = dev;
        return sl;
@@ -1388,9 +1388,9 @@ module_exit(slip_exit);
  * added by Stanislav Voronyi. All changes before marked VSV
  */
 
-static void sl_outfill(unsigned long sls)
+static void sl_outfill(struct timer_list *t)
 {
-       struct slip *sl = (struct slip *)sls;
+       struct slip *sl = from_timer(sl, t, outfill_timer);
 
        spin_lock(&sl->lock);
 
@@ -1419,9 +1419,9 @@ out:
        spin_unlock(&sl->lock);
 }
 
-static void sl_keepalive(unsigned long sls)
+static void sl_keepalive(struct timer_list *t)
 {
-       struct slip *sl = (struct slip *)sls;
+       struct slip *sl = from_timer(sl, t, keepalive_timer);
 
        spin_lock(&sl->lock);