From: Ahmed S. Darwish Date: Sat, 14 Mar 2015 13:11:47 +0000 (-0400) Subject: can: kvaser_usb: Use can-dev unregistration mechanism X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c637aab05c9dd0894832a7c542a1553b2815b9ef;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: Marc Kleine-Budde --- diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c index e97a08ce0b90..d269ae0b072a 100644 --- a/drivers/net/can/usb/kvaser_usb.c +++ b/drivers/net/can/usb/kvaser_usb.c @@ -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);