From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Petr Stehlik <pstehlik@sophics.cz>
Cc: Linux/m68k <linux-m68k@lists.linux-m68k.org>
Subject: [PATCH] aranym: Convert to net_device_ops
Date: Fri, 21 Aug 2009 22:29:52 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.00.0908212229210.18912@ayla.of.borg> (raw)
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
Compile test only
arch/m68k/emu/nfeth.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/arch/m68k/emu/nfeth.c b/arch/m68k/emu/nfeth.c
index 5b118e9..f55dfd3 100644
--- a/arch/m68k/emu/nfeth.c
+++ b/arch/m68k/emu/nfeth.c
@@ -196,6 +196,17 @@ static struct net_device_stats *nfeth_get_stats(struct net_device *dev)
return &priv->stats;
}
+static const struct net_device_ops nfeth_netdev_ops = {
+ .ndo_open = nfeth_open,
+ .ndo_stop = nfeth_stop,
+ .ndo_start_xmit = nfeth_xmit,
+ .ndo_tx_timeout = nfeth_tx_timeout,
+ .ndo_get_stats = nfeth_get_stats,
+ .ndo_validate_addr = eth_validate_addr,
+ .ndo_change_mtu = eth_change_mtu,
+ .ndo_set_mac_address = eth_mac_addr,
+};
+
struct net_device * __init nfeth_probe(int unit)
{
struct net_device *dev;
@@ -212,11 +223,8 @@ struct net_device * __init nfeth_probe(int unit)
return NULL;
dev->irq = nfEtherIRQ;
- dev->open = nfeth_open;
- dev->stop = nfeth_stop;
- dev->hard_start_xmit = nfeth_xmit;
- dev->tx_timeout = nfeth_tx_timeout;
- dev->get_stats = nfeth_get_stats;
+ dev->netdev_ops = &nfeth_netdev_ops;
+
dev->flags |= NETIF_F_NO_CSUM;
memcpy(dev->dev_addr, mac, ETH_ALEN);
--
1.6.0.4
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next reply other threads:[~2009-08-21 20:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-21 20:29 Geert Uytterhoeven [this message]
2009-09-05 20:50 ` [PATCH] aranym: Convert to net_device_ops Andreas Schwab
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=alpine.DEB.2.00.0908212229210.18912@ayla.of.borg \
--to=geert@linux-m68k.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=pstehlik@sophics.cz \
/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