From patchwork Fri Mar 27 01:11:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 25199 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 222C0DDD1C for ; Fri, 27 Mar 2009 12:29:37 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758593AbZC0B3A (ORCPT ); Thu, 26 Mar 2009 21:29:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757479AbZC0B3A (ORCPT ); Thu, 26 Mar 2009 21:29:00 -0400 Received: from suva.vyatta.com ([76.74.103.44]:43192 "EHLO suva.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757395AbZC0B27 (ORCPT ); Thu, 26 Mar 2009 21:28:59 -0400 Received: from suva.vyatta.com (suva [127.0.0.1]) by suva.vyatta.com (8.13.7/8.13.7) with ESMTP id n2R1SkRp017196; Thu, 26 Mar 2009 18:28:46 -0700 Received: (from shemminger@localhost) by suva.vyatta.com (8.13.7/8.13.7/Submit) id n2R1SQ8w017174; Thu, 26 Mar 2009 18:28:26 -0700 Message-Id: <20090327011255.959142292@linux-foundation.org> User-Agent: quilt/0.47-1 Date: Thu, 26 Mar 2009 18:11:28 -0700 From: Stephen Hemminger To: David Miller Cc: netdev@vger.kernel.org Subject: [patch 14/30] netdev: seeq8005 convert to net_device_ops References: <20090327011114.169107105@linux-foundation.org> Content-Disposition: inline; filename=seeq8005-netdev.patch Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Stephen Hemminger --- 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 --- a/drivers/net/seeq8005.c 2009-03-26 15:57:02.853605485 -0700 +++ b/drivers/net/seeq8005.c 2009-03-26 15:57:26.453599758 -0700 @@ -143,6 +143,17 @@ out: return ERR_PTR(err); } +static const struct net_device_ops seeq8005_netdev_ops = { + .ndo_open = seeq8005_open, + .ndo_stop = seeq8005_close, + .ndo_start_xmit = seeq8005_send_packet, + .ndo_tx_timeout = seeq8005_timeout, + .ndo_set_multicast_list = set_multicast_list, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr, +}; + /* 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 verifies that the correct device exists and functions. */ @@ -332,12 +343,8 @@ static int __init seeq8005_probe1(struct } } #endif - dev->open = seeq8005_open; - dev->stop = seeq8005_close; - dev->hard_start_xmit = seeq8005_send_packet; - dev->tx_timeout = seeq8005_timeout; + dev->netdev_ops = &seeq8005_netdev_ops; dev->watchdog_timeo = HZ/20; - dev->set_multicast_list = set_multicast_list; dev->flags &= ~IFF_MULTICAST; return 0;