return IRQ_HANDLED;
}
-static void sdla_poll(unsigned long device)
+static void sdla_poll(struct timer_list *t)
{
- struct net_device *dev;
- struct frad_local *flp;
-
- dev = (struct net_device *) device;
- flp = netdev_priv(dev);
+ struct frad_local *flp = from_timer(flp, t, timer);
+ struct net_device *dev = flp->dev;
if (sdla_byte(dev, SDLA_502_RCV_BUF))
sdla_receive(dev);
flp->assoc = sdla_assoc;
flp->deassoc = sdla_deassoc;
flp->dlci_conf = sdla_dlci_conf;
+ flp->dev = dev;
- setup_timer(&flp->timer, sdla_poll, (unsigned long)dev);
+ timer_setup(&flp->timer, sdla_poll, 0);
flp->timer.expires = 1;
}
/* fields that are used by the Sangoma SDLA cards */
struct timer_list timer;
+ struct net_device *dev;
int type; /* adapter type */
int state; /* state of the S502/8 control latch */
int buffer; /* current buffer for S508 firmware */