can: kvaser_usb: Use can-dev unregistration mechanism
authorAhmed S. Darwish <ahmed.darwish@valeo.com>
Sat, 14 Mar 2015 13:11:47 +0000 (09:11 -0400)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 22 Mar 2015 22:50:11 +0000 (23:50 +0100)
Use can-dev's unregister_candev() instead of directly calling
networking unregister_netdev(). While both are functionally
equivalent, unregister_candev() might do extra stuff in the
future than just calling networking layer unregistration code.

Signed-off-by: Ahmed S. Darwish <ahmed.darwish@valeo.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/kvaser_usb.c

index e97a08ce0b90c298577fed09c96dc7a711076e5e..d269ae0b072a4660ba90bcd5fc132b891c3b0522 100644 (file)
@@ -1856,7 +1856,7 @@ static void kvaser_usb_remove_interfaces(struct kvaser_usb *dev)
                if (!dev->nets[i])
                        continue;
 
-               unregister_netdev(dev->nets[i]->netdev);
+               unregister_candev(dev->nets[i]->netdev);
        }
 
        kvaser_usb_unlink_all_urbs(dev);