netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <n0-1@freewrt.org>
To: netdev@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"David S. Miller" <davem@davemloft.net>,
	florian@openwrt.org, Roel Kluin <roel.kluin@gmail.com>
Subject: [PATCH 3/3] korina: convert to net_device_ops
Date: Sun,  9 Aug 2009 02:06:28 +0200	[thread overview]
Message-ID: <20090809000650.2495F4CEAA@orbit.nwl.cc> (raw)
In-Reply-To: <1249776388-4626-3-git-send-email-n0-1@freewrt.org>

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
---
 drivers/net/korina.c |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/drivers/net/korina.c b/drivers/net/korina.c
index d256022..894f686 100644
--- a/drivers/net/korina.c
+++ b/drivers/net/korina.c
@@ -1088,6 +1088,18 @@ static int korina_close(struct net_device *dev)
 	return 0;
 }
 
+static const struct net_device_ops korina_netdev_ops = {
+	.ndo_open               = korina_open,
+	.ndo_stop               = korina_close,
+	.ndo_start_xmit         = korina_send_packet,
+	.ndo_set_multicast_list = korina_multicast_list,
+	.ndo_tx_timeout         = korina_tx_timeout,
+	.ndo_do_ioctl           = korina_ioctl,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	.ndo_poll_controller    = korina_poll_controller,
+#endif
+};
+
 static int korina_probe(struct platform_device *pdev)
 {
 	struct korina_device *bif = platform_get_drvdata(pdev);
@@ -1156,17 +1168,10 @@ static int korina_probe(struct platform_device *pdev)
 	dev->irq = lp->rx_irq;
 	lp->dev = dev;
 
-	dev->open = korina_open;
-	dev->stop = korina_close;
-	dev->hard_start_xmit = korina_send_packet;
-	dev->set_multicast_list = &korina_multicast_list;
+	dev->netdev_ops = &korina_netdev_ops;
 	dev->ethtool_ops = &netdev_ethtool_ops;
-	dev->tx_timeout = korina_tx_timeout;
 	dev->watchdog_timeo = TX_TIMEOUT;
-	dev->do_ioctl = &korina_ioctl;
-#ifdef CONFIG_NET_POLL_CONTROLLER
-	dev->poll_controller = korina_poll_controller;
-#endif
+
 	netif_napi_add(dev, &lp->napi, korina_poll, 64);
 
 	lp->phy_addr = (((lp->rx_irq == 0x2c? 1:0) << 8) | 0x05);
-- 
1.6.0.6


      parent reply	other threads:[~2009-08-09  0:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-07 15:33 [PATCH] korina: Read buffer overflow Roel Kluin
2009-08-08  0:48 ` Phil Sutter
2009-08-08 13:14   ` roel kluin
2009-08-08 16:45     ` Phil Sutter
2009-08-09  0:06       ` Phil Sutter
2009-08-12 22:15         ` Phil Sutter
2009-08-12 22:22           ` [PATCH 1/2] korina: fix printk formatting, add final info line Phil Sutter
2009-08-12 22:52             ` [PATCH 2/2] korina: add error-handling to korina_alloc_ring Phil Sutter
2009-08-13 23:27               ` David Miller
2009-08-13 23:27             ` [PATCH 1/2] korina: fix printk formatting, add final info line David Miller
     [not found]       ` <1249776388-4626-1-git-send-email-n0-1@freewrt.org>
2009-08-09  0:06         ` [PATCH 1/3] " Phil Sutter
     [not found]         ` <1249776388-4626-2-git-send-email-n0-1@freewrt.org>
2009-08-09  0:06           ` [PATCH 2/3] korina: add error-handling to korina_alloc_ring Phil Sutter
     [not found]           ` <1249776388-4626-3-git-send-email-n0-1@freewrt.org>
2009-08-09  0:06             ` Phil Sutter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090809000650.2495F4CEAA@orbit.nwl.cc \
    --to=n0-1@freewrt.org \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=florian@openwrt.org \
    --cc=netdev@vger.kernel.org \
    --cc=roel.kluin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).