[PATCH v1] net: eth-uclass: Change uclass driver name to ethernet

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH v1] net: eth-uclass: Change uclass driver name to ethernet

David Wu
dev_read_alias_seq() used uc_drv->name compared to alias
stem string, Ethernet's alias stem uses "ethernet", which
does not match the eth-uclass driver name "eth", can not
get the correct index of ethernet alias namer. So it seems
change uclass driver name to match the alias stem is a more
reasonable way.

Signed-off-by: David Wu <[hidden email]>
---
 net/eth-uclass.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index e14695c0f1..3497a17db6 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -593,8 +593,8 @@ static int eth_pre_remove(struct udevice *dev)
  return 0;
 }
 
-UCLASS_DRIVER(eth) = {
- .name = "eth",
+UCLASS_DRIVER(ethernet) = {
+ .name = "ethernet",
  .id = UCLASS_ETH,
  .post_bind = eth_post_bind,
  .pre_unbind = eth_pre_unbind,
--
2.19.1



Reply | Threaded
Open this post in threaded view
|

Re: [PATCH v1] net: eth-uclass: Change uclass driver name to ethernet

Simon Glass-3
On Thu, 7 Jan 2021 at 19:53, David Wu <[hidden email]> wrote:

>
> dev_read_alias_seq() used uc_drv->name compared to alias
> stem string, Ethernet's alias stem uses "ethernet", which
> does not match the eth-uclass driver name "eth", can not
> get the correct index of ethernet alias namer. So it seems
> change uclass driver name to match the alias stem is a more
> reasonable way.
>
> Signed-off-by: David Wu <[hidden email]>
> ---
>  net/eth-uclass.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <[hidden email]>