From: jonas.jensen@gmail.com (Jonas Jensen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 6/6] net: MOXA ART: use eth_mac_addr()
Date: Mon, 25 Nov 2013 16:27:08 +0100 [thread overview]
Message-ID: <1385393228-22416-6-git-send-email-jonas.jensen@gmail.com> (raw)
In-Reply-To: <1385393228-22416-1-git-send-email-jonas.jensen@gmail.com>
Replace boilerplate in moxart_set_mac_address() with eth_mac_addr().
Signed-off-by: Jonas Jensen <jonas.jensen@gmail.com>
---
Notes:
Applies to next-20131125
drivers/net/ethernet/moxa/moxart_ether.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c
index ef7a347..e6e42ee 100644
--- a/drivers/net/ethernet/moxa/moxart_ether.c
+++ b/drivers/net/ethernet/moxa/moxart_ether.c
@@ -57,12 +57,7 @@ static void moxart_update_mac_address(struct net_device *ndev)
static int moxart_set_mac_address(struct net_device *ndev, void *addr)
{
- struct sockaddr *address = addr;
-
- if (!is_valid_ether_addr(address->sa_data))
- return -EADDRNOTAVAIL;
-
- memcpy(ndev->dev_addr, address->sa_data, ndev->addr_len);
+ eth_mac_addr(ndev, addr);
moxart_update_mac_address(ndev);
return 0;
--
1.8.2.1
next prev parent reply other threads:[~2013-11-25 15:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-25 15:27 [PATCH v2 1/6] net: MOXA ART: clear TX descriptor length bits between sends Jonas Jensen
2013-11-25 15:27 ` [PATCH v2 2/6] net: MOXA ART: connect to PHY Jonas Jensen
2013-11-26 7:49 ` Florian Fainelli
2013-11-25 15:27 ` [PATCH v2 3/6] net: MOXA ART: add ethtool support Jonas Jensen
2013-11-25 15:36 ` Ben Hutchings
2013-11-25 15:27 ` [PATCH v2 4/6] net: MOXA ART: add IFF_LIVE_ADDR_CHANGE flag Jonas Jensen
2013-11-25 15:27 ` [PATCH v2 5/6] net: MOXA ART: generate random address Jonas Jensen
2013-11-25 15:27 ` Jonas Jensen [this message]
2013-11-28 23:36 ` [PATCH v2 1/6] net: MOXA ART: clear TX descriptor length bits between sends 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=1385393228-22416-6-git-send-email-jonas.jensen@gmail.com \
--to=jonas.jensen@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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).