Skip to content

Commit

Permalink
can: kvaser_usb: Use can-dev unregistration mechanism
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ahmed S. Darwish authored and Marc Kleine-Budde committed Mar 22, 2015
1 parent 2b290bb commit c637aab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/can/usb/kvaser_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c637aab

Please sign in to comment.