From patchwork Thu Jan 8 13:22:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Neukum X-Patchwork-Id: 17365 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 6E4D7474C3 for ; Fri, 9 Jan 2009 00:22:40 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755385AbZAHNWg (ORCPT ); Thu, 8 Jan 2009 08:22:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753421AbZAHNWe (ORCPT ); Thu, 8 Jan 2009 08:22:34 -0500 Received: from smtp-out002.kontent.com ([81.88.40.216]:53334 "EHLO smtp-out002.kontent.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752824AbZAHNWd (ORCPT ); Thu, 8 Jan 2009 08:22:33 -0500 Received: from noname (p549A31E9.dip0.t-ipconnect.de [84.154.49.233]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-out.kontent.com (Postfix) with ESMTP id C4EB4580348E; Thu, 8 Jan 2009 14:22:31 +0100 (CET) From: Oliver Neukum Organization: Novell To: netdev@vger.kernel.org Subject: [patch]switch kaweth driver to netdevops Date: Thu, 8 Jan 2009 14:22:54 +0100 User-Agent: KMail/1.9.10 Cc: davem@davemloft.net, linux-usb@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200901081422.55536.oliver@neukum.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This converts the kaweth ethernet USB driver to netdevops. Signed-off-by: Oliver Neukum Regards Oliver commit f439f3ec3c68586f92dd692f220e44fd898a50bb Author: Oliver Neukum Date: Wed Jan 7 14:31:21 2009 +0100 convert kaweth to new netdev ops --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index 2ee034f..e166b87 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c @@ -251,7 +251,6 @@ struct kaweth_device struct net_device_stats stats; }; - /**************************************************************** * kaweth_control ****************************************************************/ @@ -975,6 +974,17 @@ static int kaweth_resume(struct usb_interface *intf) /**************************************************************** * kaweth_probe ****************************************************************/ + + +static const struct net_device_ops kaweth_netdev_ops = { + .ndo_open = kaweth_open, + .ndo_stop = kaweth_close, + .ndo_start_xmit = kaweth_start_xmit, + .ndo_tx_timeout = kaweth_tx_timeout, + .ndo_set_multicast_list = kaweth_set_rx_mode, + .ndo_get_stats = kaweth_netdev_stats, +}; + static int kaweth_probe( struct usb_interface *intf, const struct usb_device_id *id /* from id_table */ @@ -1147,22 +1157,13 @@ err_fw: memcpy(netdev->dev_addr, &kaweth->configuration.hw_addr, sizeof(kaweth->configuration.hw_addr)); - netdev->open = kaweth_open; - netdev->stop = kaweth_close; - + netdev->netdev_ops = &kaweth_netdev_ops; netdev->watchdog_timeo = KAWETH_TX_TIMEOUT; - netdev->tx_timeout = kaweth_tx_timeout; - - netdev->hard_start_xmit = kaweth_start_xmit; - netdev->set_multicast_list = kaweth_set_rx_mode; - netdev->get_stats = kaweth_netdev_stats; netdev->mtu = le16_to_cpu(kaweth->configuration.segment_size); SET_ETHTOOL_OPS(netdev, &ops); /* kaweth is zeroed as part of alloc_netdev */ - INIT_DELAYED_WORK(&kaweth->lowmem_work, kaweth_resubmit_tl); - usb_set_intfdata(intf, kaweth); #if 0