Commit e2ce67e9 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] dscc4 compile fix for hdlc

From: Francois Romieu <romieu@fr.zoreil.com>

The wan driver I maintain was hit by hdlc changes too. Please
apply patch below. It is diffed against plain -test2 but it
applies equally as well against -test2-mm2.

More important changes will come in a near future for this
driver but I'd rather keep the changes separated.

Description:
- after the hdlc changes, dscc4 module doesn't need to set
  hdlc->proto(.id) itself anymore;
- MOD_{INC/DEC}_USE_COUNT removal;
- SET_NETDEV_DEV() use;
parent 6e28ae46
......@@ -876,6 +876,8 @@ static int dscc4_found1(struct pci_dev *pdev, unsigned long ioaddr)
d->do_ioctl = dscc4_ioctl;
d->tx_timeout = dscc4_tx_timeout;
d->watchdog_timeo = TX_TIMEOUT;
SET_MODULE_OWNER(d);
SET_NETDEV_DEV(d, &pdev->dev);
dpriv->dev_id = i;
dpriv->pci_priv = ppriv;
......@@ -888,8 +890,7 @@ static int dscc4_found1(struct pci_dev *pdev, unsigned long ioaddr)
printk(KERN_ERR "%s: unable to register\n", DRV_NAME);
goto err_unregister;
}
hdlc->proto = IF_PROTO_HDLC;
SET_MODULE_OWNER(d);
dscc4_init_registers(dpriv, d);
dpriv->parity = PARITY_CRC16_PR0_CCITT;
dpriv->encoding = ENCODING_NRZ;
......@@ -955,8 +956,6 @@ static int dscc4_open(struct net_device *dev)
if ((ret = hdlc_open(hdlc)))
goto err;
MOD_INC_USE_COUNT;
ppriv = dpriv->pci_priv;
if ((ret = dscc4_init_ring(dev)))
......@@ -1015,7 +1014,6 @@ static int dscc4_open(struct net_device *dev)
dscc4_release_ring(dpriv);
err_out:
hdlc_close(hdlc);
MOD_DEC_USE_COUNT;
err:
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment