From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ahmed S. Darwish" Subject: [PATCH 4/5] can: kvaser_usb: Use can-dev unregistration mechanism Date: Thu, 26 Feb 2015 10:25:58 -0500 Message-ID: <20150226152558.GD6075@linux> References: <20150226152011.GA6075@linux> <20150226152202.GB6075@linux> <20150226152436.GC6075@linux> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-wg0-f49.google.com ([74.125.82.49]:43045 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753789AbbBZP0C (ORCPT ); Thu, 26 Feb 2015 10:26:02 -0500 Content-Disposition: inline In-Reply-To: <20150226152436.GC6075@linux> Sender: linux-can-owner@vger.kernel.org List-ID: To: Olivier Sobrie , Oliver Hartkopp , Wolfgang Grandegger , Marc Kleine-Budde , Andri Yngvason Cc: Linux-CAN , LKML From: Ahmed S. Darwish 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 --- drivers/net/can/usb/kvaser_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c index 8f835a1..13bae86 100644 --- a/drivers/net/can/usb/kvaser_usb.c +++ b/drivers/net/can/usb/kvaser_usb.c @@ -1844,7 +1844,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); -- 1.9.1