From patchwork Sat Apr 11 17:43:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Beregalov X-Patchwork-Id: 25862 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 89B3FDE20F for ; Sun, 12 Apr 2009 03:43:27 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757433AbZDKRnW (ORCPT ); Sat, 11 Apr 2009 13:43:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757099AbZDKRnW (ORCPT ); Sat, 11 Apr 2009 13:43:22 -0400 Received: from yw-out-2324.google.com ([74.125.46.31]:21255 "EHLO yw-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753723AbZDKRnV (ORCPT ); Sat, 11 Apr 2009 13:43:21 -0400 Received: by yw-out-2324.google.com with SMTP id 5so1586548ywb.1 for ; Sat, 11 Apr 2009 10:43:20 -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=8qTHXN/toG6jVE0oJkjzVSt5GIxL3y8u121KOiMhhno=; b=LuknQtOE+gQv7NEnkWIQAoxP0uB7/S4p9uGG1mlCA5jQCLWKCslTrMhwWN77ivWYKX 9AQoB8qNzGJW4ylY4qGkwyu1XNKH0z4UcKej73xOZXJDoPZZBeXRx60OStvkO51l6Fld +fSZwutPyBxp8wsQ8C1qCJIxrozmvGyQsYs4g= 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=mSf7IgK5sHeLG7jZhyG0oQjTKVa6x3XBTwTL8ozCEID7LaPL2uqr0bZo3kB3f9HimD BPLAwzKwados4JMwMRwMoSJ3z0JiqgJjIJd4A8xfwvKR28kDSRPnz8UEAJYhl9u6T0Ng ibo2QLvkYNFE7LuXhmHh9zA9e6ZfTj8vDPdyI= Received: by 10.100.42.4 with SMTP id p4mr4534345anp.115.1239471800365; Sat, 11 Apr 2009 10:43:20 -0700 (PDT) Received: from orion ([91.78.156.47]) by mx.google.com with ESMTPS id b37sm2573674ana.31.2009.04.11.10.43.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 11 Apr 2009 10:43:19 -0700 (PDT) Date: Sat, 11 Apr 2009 21:43:11 +0400 From: Alexander Beregalov To: netdev@vger.kernel.org Subject: [PATCH 08/11] mac89x0: convert to net_device_ops Message-ID: <20090411174311.GH16999@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/mac89x0.c | 18 ++++++++++++------ 1 files changed, 12 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/mac89x0.c b/drivers/net/mac89x0.c index 380a1a5..384e072 100644 --- a/drivers/net/mac89x0.c +++ b/drivers/net/mac89x0.c @@ -168,6 +168,17 @@ writereg(struct net_device *dev, int portno, int value) nubus_writew(swab16(value), dev->mem_start + portno); } +static const struct net_device_ops mac89x0_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_set_mac_address = set_mac_address, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, +}; + /* Probe for the CS8900 card in slot E. We won't bother looking anywhere else until we have a really good reason to do so. */ struct net_device * __init mac89x0_probe(int unit) @@ -280,12 +291,7 @@ struct net_device * __init mac89x0_probe(int unit) printk(" IRQ %d ADDR %pM\n", dev->irq, dev->dev_addr); - 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->set_mac_address = &set_mac_address; + dev->netdev_ops = &mac89x0_netdev_ops; err = register_netdev(dev); if (err)