From patchwork Fri Mar 27 01:11:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 25190 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 9CE29DDDA0 for ; Fri, 27 Mar 2009 12:23:52 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754266AbZC0BXt (ORCPT ); Thu, 26 Mar 2009 21:23:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754034AbZC0BXt (ORCPT ); Thu, 26 Mar 2009 21:23:49 -0400 Received: from suva.vyatta.com ([76.74.103.44]:39805 "EHLO suva.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753857AbZC0BXs (ORCPT ); Thu, 26 Mar 2009 21:23:48 -0400 Received: from suva.vyatta.com (suva [127.0.0.1]) by suva.vyatta.com (8.13.7/8.13.7) with ESMTP id n2R1NO0N016812; Thu, 26 Mar 2009 18:23:24 -0700 Received: (from shemminger@localhost) by suva.vyatta.com (8.13.7/8.13.7/Submit) id n2R1MsPi016805; Thu, 26 Mar 2009 18:22:54 -0700 Message-Id: <20090327011255.312373568@linux-foundation.org> User-Agent: quilt/0.47-1 Date: Thu, 26 Mar 2009 18:11:19 -0700 From: Stephen Hemminger To: David Miller , acme@ghostprotocols.net Cc: netdev@vger.kernel.org Subject: [patch 05/30] To: acme@ghostprotocols.net Subjetct: appltetalk: convert cops device to net_device ops References: <20090327011114.169107105@linux-foundation.org> Content-Disposition: inline; filename=cops-netdev-ops.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/appletalk/cops.c 2009-03-22 21:19:10.000000000 -0700 +++ b/drivers/net/appletalk/cops.c 2009-03-22 23:12:17.941522246 -0700 @@ -258,6 +258,15 @@ out: return ERR_PTR(err); } +static const struct net_device_ops cops_netdev_ops = { + .ndo_open = cops_open, + .ndo_stop = cops_close, + .ndo_start_xmit = cops_send_packet, + .ndo_tx_timeout = cops_timeout, + .ndo_do_ioctl = cops_ioctl, + .ndo_set_multicast_list = set_multicast_list, +}; + /* * 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 @@ -331,15 +340,9 @@ static int __init cops_probe1(struct net /* Copy local board variable to lp struct. */ lp->board = board; - dev->hard_start_xmit = cops_send_packet; - dev->tx_timeout = cops_timeout; + dev->netdev_ops = &cops_netdev_ops; dev->watchdog_timeo = HZ * 2; - dev->open = cops_open; - dev->stop = cops_close; - dev->do_ioctl = cops_ioctl; - dev->set_multicast_list = set_multicast_list; - dev->mc_list = NULL; /* Tell the user where the card is and what mode we're in. */ if(board==DAYNA)