[PATCH 2/5] net: constify eth_get_byname argument
Sascha Hauer
s.hauer at pengutronix.de
Thu Feb 27 16:00:09 EST 2014
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
include/net.h | 2 +-
net/eth.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/net.h b/include/net.h
index 6c86947..a680f97 100644
--- a/include/net.h
+++ b/include/net.h
@@ -404,7 +404,7 @@ typedef void rx_handler_f(void *ctx, char *packet, unsigned int len);
void eth_set_current(struct eth_device *eth);
struct eth_device *eth_get_current(void);
-struct eth_device *eth_get_byname(char *name);
+struct eth_device *eth_get_byname(const char *name);
/**
* net_receive - Pass a received packet from an ethernet driver to the protocol stack
diff --git a/net/eth.c b/net/eth.c
index 524fb89..1f48f2d 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -144,7 +144,7 @@ struct eth_device * eth_get_current(void)
return eth_current;
}
-struct eth_device *eth_get_byname(char *ethname)
+struct eth_device *eth_get_byname(const char *ethname)
{
struct eth_device *edev;
--
1.8.5.3
More information about the barebox
mailing list