From patchwork Fri Jan 9 23:01:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 17650 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 06DFCDE03B for ; Sat, 10 Jan 2009 10:19:18 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757623AbZAIXTA (ORCPT ); Fri, 9 Jan 2009 18:19:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757545AbZAIXS7 (ORCPT ); Fri, 9 Jan 2009 18:18:59 -0500 Received: from suva.vyatta.com ([76.74.103.44]:42279 "EHLO suva.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753976AbZAIXSL (ORCPT ); Fri, 9 Jan 2009 18:18:11 -0500 Received: from suva.vyatta.com (suva [127.0.0.1]) by suva.vyatta.com (8.13.7/8.13.7) with ESMTP id n09NI2nL017298; Fri, 9 Jan 2009 15:18:02 -0800 Received: (from shemminger@localhost) by suva.vyatta.com (8.13.7/8.13.7/Submit) id n09NI2tO017296; Fri, 9 Jan 2009 15:18:02 -0800 Message-Id: <20090109230139.625427535@linux-foundation.org> User-Agent: quilt/0.47-1 Date: Fri, 09 Jan 2009 15:01:36 -0800 From: Stephen Hemminger To: David Miller , t.sailer@alumni.ethz.ch Cc: netdev@vger.kernel.org, linux-hams@vger.kernel.org Subject: [patch 39/45] hdlcdrv: convert to net_device_ops References: <20090109230057.575650817@linux-foundation.org> Content-Disposition: inline; filename=hdlcdrv-netdev.patch Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Stephen Hemminger Acked-by: Thomas Sailer --- 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/hamradio/hdlcdrv.c 2009-01-09 12:52:18.000000000 -0800 +++ b/drivers/net/hamradio/hdlcdrv.c 2009-01-09 12:52:27.000000000 -0800 @@ -617,6 +617,14 @@ static int hdlcdrv_ioctl(struct net_devi /* --------------------------------------------------------------------- */ +static const struct net_device_ops hdlcdrv_netdev = { + .ndo_open = hdlcdrv_open, + .ndo_stop = hdlcdrv_close, + .ndo_start_xmit = hdlcdrv_send_packet, + .ndo_do_ioctl = hdlcdrv_ioctl, + .ndo_set_mac_address = hdlcdrv_set_mac_address, +}; + /* * Initialize fields in hdlcdrv */ @@ -656,21 +664,13 @@ static void hdlcdrv_setup(struct net_dev s->bitbuf_hdlc.shreg = 0x80; #endif /* HDLCDRV_DEBUG */ - /* - * initialize the device struct - */ - dev->open = hdlcdrv_open; - dev->stop = hdlcdrv_close; - dev->do_ioctl = hdlcdrv_ioctl; - dev->hard_start_xmit = hdlcdrv_send_packet; - dev->get_stats = hdlcdrv_get_stats; /* Fill in the fields of the device structure */ s->skb = NULL; + dev->netdev_ops = &hdlcdrv_netdev; dev->header_ops = &ax25_header_ops; - dev->set_mac_address = hdlcdrv_set_mac_address; dev->type = ARPHRD_AX25; /* AF_AX25 device */ dev->hard_header_len = AX25_MAX_HEADER_LEN + AX25_BPQ_HEADER_LEN;