From patchwork Sun Mar 29 02:26:13 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Beregalov X-Patchwork-Id: 25267 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 5FB26DDE0E for ; Sun, 29 Mar 2009 13:29:27 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755203AbZC2C0Z (ORCPT ); Sat, 28 Mar 2009 22:26:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755022AbZC2C0Z (ORCPT ); Sat, 28 Mar 2009 22:26:25 -0400 Received: from fg-out-1718.google.com ([72.14.220.158]:22123 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754346AbZC2C0Y (ORCPT ); Sat, 28 Mar 2009 22:26:24 -0400 Received: by fg-out-1718.google.com with SMTP id 16so149384fgg.17 for ; Sat, 28 Mar 2009 19:26:21 -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:mime-version:content-type:content-disposition:user-agent; bh=1I9bp5EBKnqSmTOQc2vAXPVAqZQjDEsPv+ATH9tltGw=; b=sDS+JKdWzTT44QCh04gsVFpQYS17zJtUVN531HVTZigWM1TJLaNwbBaZV+KWDXnJmh BEtx3p78ZvWHqE5oHyejqT/HWDS/iHrY0kkTvKVGOeKy0fEwuqyA9ilWtMrF9zHzUYd1 9pPlkLN5Ln5R4KJf2roY0OfEXCiWDK9xa159I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=gSyO+OA+RgfHUR96/GoDyzE5iltJ85HyUJUyoRAri6lR6rsuKzGQgX7PZbErR5nFU/ MggyikgCnHrSLq7y/gClCumcIv0RlWrpi/wvdxerSg8cUgoMFPN9BrD9CnjmxG0Fggim P5CMZInjV2NW+gE85k/cgRG4u5pX9mMPN50uw= Received: by 10.86.60.15 with SMTP id i15mr3250885fga.12.1238293581774; Sat, 28 Mar 2009 19:26:21 -0700 (PDT) Received: from orion (ppp85-140-245-5.pppoe.mtu-net.ru [85.140.245.5]) by mx.google.com with ESMTPS id 4sm2162321fgg.25.2009.03.28.19.26.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 28 Mar 2009 19:26:21 -0700 (PDT) Date: Sun, 29 Mar 2009 06:26:13 +0400 From: Alexander Beregalov To: David Miller , netdev@vger.kernel.org, Stephen Hemminger Subject: [PATCH] ni5010: convert to net_device_ops Message-ID: <20090329022613.GA30897@orion> MIME-Version: 1.0 Content-Disposition: inline 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/ni5010.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 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/ni5010.c b/drivers/net/ni5010.c index 539e18a..b121e0f 100644 --- a/drivers/net/ni5010.c +++ b/drivers/net/ni5010.c @@ -189,6 +189,14 @@ static void __init trigger_irq(int ioaddr) outb(MM_EN_XMT|MM_MUX, IE_MMODE); /* Start transmission */ } +static const struct net_device_ops ni5010_netdev_ops = { + .ndo_open = ni5010_open, + .ndo_stop = ni5010_close, + .ndo_start_xmit = ni5010_send_packet, + .ndo_set_multicast_list = ni5010_set_multicast_list, + .ndo_tx_timeout = ni5010_timeout, +}; + /* * 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 @@ -328,13 +336,8 @@ static int __init ni5010_probe1(struct net_device *dev, int ioaddr) outb(0, IE_RBUF); /* set buffer byte 0 to 0 again */ } printk("-> bufsize rcv/xmt=%d/%d\n", bufsize_rcv, NI5010_BUFSIZE); - memset(netdev_priv(dev), 0, sizeof(struct ni5010_local)); - dev->open = ni5010_open; - dev->stop = ni5010_close; - dev->hard_start_xmit = ni5010_send_packet; - dev->set_multicast_list = ni5010_set_multicast_list; - dev->tx_timeout = ni5010_timeout; + dev->netdev_ops = &ni5010_netdev_ops; dev->watchdog_timeo = HZ/20; dev->flags &= ~IFF_MULTICAST; /* Multicast doesn't work */