From patchwork Sat Apr 11 17:44:06 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Beregalov X-Patchwork-Id: 25863 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 A76D0DE063 for ; Sun, 12 Apr 2009 03:44:43 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758458AbZDKRoQ (ORCPT ); Sat, 11 Apr 2009 13:44:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758329AbZDKRoP (ORCPT ); Sat, 11 Apr 2009 13:44:15 -0400 Received: from an-out-0708.google.com ([209.85.132.241]:21924 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757966AbZDKRoO (ORCPT ); Sat, 11 Apr 2009 13:44:14 -0400 Received: by an-out-0708.google.com with SMTP id d14so1350769and.1 for ; Sat, 11 Apr 2009 10:44:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=8thT97Owbm+LC1q+Ttru2TKGskjadWqi8AsEAVT43JY=; b=mQKiDbC8mvS545ZhF475WfN+tsLDWwiXRmC1RqPjJ8r9yghrzkR8JaV+kA8MhZh1ix c8zrKLCuljg86zAuXzgSHRzZmSPraWbCGggusEDDxttz7pOq6gT0pvigH048endvJ0eG J1sOWFAUm09sEMWh5niZbU3jfMt25UUXd/iAE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=xsAk9/5mRXi1vkNi4cPXhGG5clGV/Q4M52807xvVnUN+aeKW8wD5uY7uhPozV/8poR tAYT2rtWq/33U+WlT8/G/gI9DTzQQcuNBmkT+rKSYZIzcVgvoXCDFxK5zdt1Ghnd8K7r mvl9Qz+h7uYPDbPzR8tGxA/5cIknoILmgSABo= Received: by 10.100.166.10 with SMTP id o10mr623644ane.157.1239471852931; Sat, 11 Apr 2009 10:44:12 -0700 (PDT) Received: from orion (ppp91-78-156-47.pppoe.mtu-net.ru [91.78.156.47]) by mx.google.com with ESMTPS id c9sm9770916ana.5.2009.04.11.10.44.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 11 Apr 2009 10:44:12 -0700 (PDT) Date: Sat, 11 Apr 2009 21:44:06 +0400 From: Alexander Beregalov To: netdev@vger.kernel.org Subject: [PATCH 09/11] isa-skeleton: convert to net_device_ops Message-ID: <20090411174406.GI16999@orion> References: <20090411173019.GA16999@orion> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090411173019.GA16999@orion> User-Agent: Mutt/1.5.19 (2009-01-05) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Alexander Beregalov --- drivers/net/isa-skeleton.c | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) -- 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/isa-skeleton.c b/drivers/net/isa-skeleton.c index 3126678..73585fd 100644 --- a/drivers/net/isa-skeleton.c +++ b/drivers/net/isa-skeleton.c @@ -181,6 +181,18 @@ out: } #endif +static const struct net_device_ops netcard_netdev_ops = { + .ndo_open = net_open, + .ndo_stop = net_close, + .ndo_start_xmit = net_send_packet, + .ndo_get_stats = net_get_stats, + .ndo_set_multicast_list = set_multicast_list, + .ndo_tx_timeout = net_tx_timeout, + .ndo_validate_addr = eth_validate_addr, + .ndo_set_mac_address = eth_mac_addr, + .ndo_change_mtu = eth_change_mtu, +}; + /* * This is the real probe routine. Linux has a history of friendly device * probes on the ISA bus. A good device probes avoids doing writes, and @@ -303,13 +315,7 @@ static int __init netcard_probe1(struct net_device *dev, int ioaddr) np = netdev_priv(dev); spin_lock_init(&np->lock); - dev->open = net_open; - dev->stop = net_close; - dev->hard_start_xmit = net_send_packet; - dev->get_stats = net_get_stats; - dev->set_multicast_list = &set_multicast_list; - - dev->tx_timeout = &net_tx_timeout; + dev->netdev_ops = &netcard_netdev_ops; dev->watchdog_timeo = MY_TX_TIMEOUT; err = register_netdev(dev);