can: kvaser_usb: Use can-dev unregistration mechanism
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>
This commit is contained in:
parent
2b290bbb60
commit
c637aab05c
@ -1856,7 +1856,7 @@ static void kvaser_usb_remove_interfaces(struct kvaser_usb *dev)
|
|||||||
if (!dev->nets[i])
|
if (!dev->nets[i])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
unregister_netdev(dev->nets[i]->netdev);
|
unregister_candev(dev->nets[i]->netdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
kvaser_usb_unlink_all_urbs(dev);
|
kvaser_usb_unlink_all_urbs(dev);
|
||||||
|
Loading…
Reference in New Issue
Block a user