Commit 4a2f92b2 authored by Andrew Morton's avatar Andrew Morton Committed by David S. Miller

[NET]: Convert rtnl_lock/register_netdevice/rtnl_unlock to register_netdev.

parent ee2c0020
......@@ -324,11 +324,8 @@ void cleanup_module(void) {
/* Unregister devices */
for (i = 0; i < 2; i++) {
if (info->dev[i].name) {
rtnl_lock();
unregister_netdevice(&info->dev[i]);
rtnl_unlock();
}
if (info->dev[i].name)
unregister_netdev(&info->dev[i]);
}
/* Reset board */
......
......@@ -390,11 +390,8 @@ static int __exit ali_ircc_close(struct ali_ircc_cb *self)
iobase = self->io.fir_base;
/* Remove netdevice */
if (self->netdev) {
rtnl_lock();
unregister_netdevice(self->netdev);
rtnl_unlock();
}
if (self->netdev)
unregister_netdev(self->netdev);
/* Release the PORT that this driver is using */
IRDA_DEBUG(4, "%s(), Releasing Region %03x\n", __FUNCTION__, self->io.fir_base);
......
......@@ -1579,12 +1579,7 @@ toshoboe_close (struct pci_dev *pci_dev)
}
if (self->netdev)
{
/* Remove netdevice */
rtnl_lock ();
unregister_netdevice (self->netdev);
rtnl_unlock ();
}
unregister_netdev(self->netdev);
kfree (self->ringbuf);
self->ringbuf = NULL;
......
......@@ -1231,12 +1231,10 @@ static inline int irda_usb_close(struct irda_usb_cb *self)
ASSERT(self != NULL, return -1;);
/* Remove netdevice */
if (self->netdev) {
rtnl_lock();
unregister_netdevice(self->netdev);
if (self->netdev)
unregister_netdev(self->netdev);
self->netdev = NULL;
rtnl_unlock();
}
/* Remove the speed buffer */
if (self->speed_buff != NULL) {
kfree(self->speed_buff);
......
......@@ -267,11 +267,8 @@ int irport_close(struct irport_cb *self)
self->dongle = NULL;
/* Remove netdevice */
if (self->netdev) {
rtnl_lock();
unregister_netdevice(self->netdev);
rtnl_unlock();
}
if (self->netdev)
unregister_netdev(self->netdev);
/* Release the IO-port that this driver is using */
IRDA_DEBUG(0 , "%s(), Releasing Region %03x\n",
......
......@@ -282,11 +282,8 @@ static void irtty_close(struct tty_struct *tty)
self->dongle = NULL;
/* Remove netdevice */
if (self->netdev) {
rtnl_lock();
unregister_netdevice(self->netdev);
rtnl_unlock();
}
if (self->netdev)
unregister_netdev(self->netdev);
self = hashbin_remove(irtty, (int) self, NULL);
......
......@@ -391,11 +391,8 @@ static int __exit nsc_ircc_close(struct nsc_ircc_cb *self)
iobase = self->io.fir_base;
/* Remove netdevice */
if (self->netdev) {
rtnl_lock();
unregister_netdevice(self->netdev);
rtnl_unlock();
}
if (self->netdev)
unregister_netdev(self->netdev);
/* Release the PORT that this driver is using */
IRDA_DEBUG(4, "%s(), Releasing Region %03x\n",
......
......@@ -1122,11 +1122,8 @@ static void __exit sa1100_irda_exit(void)
{
struct net_device *dev = dev_get_drvdata(&sa1100ir_device.dev);
if (dev) {
rtnl_lock();
unregister_netdevice(dev);
rtnl_unlock();
}
if (dev)
unregister_netdev(dev);
sys_device_unregister(&sa1100ir_device);
driver_unregister(&sa1100ir_driver);
......
......@@ -679,12 +679,8 @@ toshoboe_remove (struct pci_dev *pci_dev)
self->recv_bufs[i] = NULL;
}
if (self->netdev) {
/* Remove netdevice */
rtnl_lock();
unregister_netdevice(self->netdev);
rtnl_unlock();
}
if (self->netdev)
unregister_netdev(self->netdev);
kfree (self->taskfilebuf);
self->taskfilebuf = NULL;
......
......@@ -299,11 +299,8 @@ static int w83977af_close(struct w83977af_ir *self)
#endif /* CONFIG_USE_W977_PNP */
/* Remove netdevice */
if (self->netdev) {
rtnl_lock();
unregister_netdevice(self->netdev);
rtnl_unlock();
}
if (self->netdev)
unregister_netdev(self->netdev);
/* Release the PORT that this driver is using */
IRDA_DEBUG(0 , "%s(), Releasing Region %03x\n",
......
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