From: Alexander Beregalov <a.beregalov@gmail.com>
To: netdev@vger.kernel.org
Cc: Alexander Beregalov <a.beregalov@gmail.com>
Subject: [PATCH 4/5] bfin_mac: convert to net_device_ops
Date: Wed, 15 Apr 2009 08:30:24 +0400 [thread overview]
Message-ID: <1239769825-12413-4-git-send-email-a.beregalov@gmail.com> (raw)
In-Reply-To: <1239769825-12413-3-git-send-email-a.beregalov@gmail.com>
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
drivers/net/bfin_mac.c | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 9afe809..9326aef 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -979,6 +979,20 @@ static int bfin_mac_open(struct net_device *dev)
return 0;
}
+static const struct net_device_ops bfin_mac_netdev_ops = {
+ .ndo_open = bfin_mac_open,
+ .ndo_stop = bfin_mac_close,
+ .ndo_start_xmit = bfin_mac_hard_start_xmit,
+ .ndo_set_mac_address = bfin_mac_set_mac_address,
+ .ndo_tx_timeout = bfin_mac_timeout,
+ .ndo_set_multicast_list = bfin_mac_set_multicast_list,
+ .ndo_validate_addr = eth_validate_addr,
+ .ndo_change_mtu = eth_change_mtu,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = bfin_mac_poll,
+#endif
+};
+
/*
*
* this makes the board clean up everything that it can
@@ -1086,15 +1100,7 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev)
/* Fill in the fields of the device structure with ethernet values. */
ether_setup(ndev);
- ndev->open = bfin_mac_open;
- ndev->stop = bfin_mac_close;
- ndev->hard_start_xmit = bfin_mac_hard_start_xmit;
- ndev->set_mac_address = bfin_mac_set_mac_address;
- ndev->tx_timeout = bfin_mac_timeout;
- ndev->set_multicast_list = bfin_mac_set_multicast_list;
-#ifdef CONFIG_NET_POLL_CONTROLLER
- ndev->poll_controller = bfin_mac_poll;
-#endif
+ ndev->netdev_ops = &bfin_mac_netdev_ops;
ndev->ethtool_ops = &bfin_mac_ethtool_ops;
spin_lock_init(&lp->lock);
--
1.6.2.3
next prev parent reply other threads:[~2009-04-15 4:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-15 4:30 [PATCH 1/5] a2065: convert to net_device_ops Alexander Beregalov
2009-04-15 4:30 ` [PATCH 2/5] atarilance: " Alexander Beregalov
2009-04-15 4:30 ` [PATCH 3/5] au1000: " Alexander Beregalov
2009-04-15 4:30 ` Alexander Beregalov [this message]
2009-04-15 4:30 ` [PATCH 5/5] declance: " Alexander Beregalov
2009-04-15 4:58 ` David Miller
2009-04-15 4:58 ` [PATCH 4/5] bfin_mac: " David Miller
2009-04-15 4:58 ` [PATCH 3/5] au1000: " David Miller
2009-04-15 4:57 ` [PATCH 2/5] atarilance: " David Miller
2009-04-15 4:57 ` [PATCH 1/5] a2065: " David Miller
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=1239769825-12413-4-git-send-email-a.beregalov@gmail.com \
--to=a.beregalov@gmail.com \
--cc=netdev@vger.kernel.org \
/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).