Message ID | 1314362843-18214-1-git-send-email-monstr@monstr.eu |
---|---|
State | Accepted |
Commit | 25a025518b7034e43c420d2cfec83a9eab7f70bb |
Headers | show |
On Friday, August 26, 2011 08:47:16 Michal Simek wrote: > - sprintf(dev->name, "Xilinx_Emaclite"); > + sprintf(dev->name, "Xelite.%x", base_addr); you calculated this down to the byte huh ;). i see it uses the full 16. do we have to worry about people who specify the device in their envs ? i'm guessing not if the current driver only supports one instance. -mike
Mike Frysinger wrote: > On Friday, August 26, 2011 08:47:16 Michal Simek wrote: >> - sprintf(dev->name, "Xilinx_Emaclite"); >> + sprintf(dev->name, "Xelite.%x", base_addr); > > you calculated this down to the byte huh ;). i see it uses the full 16. Yes, I had to because eth_device has 16 chars array for it. > > do we have to worry about people who specify the device in their envs ? i'm > guessing not if the current driver only supports one instance. The whole point is to support several instances that's why I need to add base address to name and fit to 16 chars. Michal
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index 3c7c250..8d170a3 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -350,7 +350,7 @@ int xilinx_emaclite_initialize (bd_t *bis, int base_addr) return -1; memset(dev, 0, sizeof(*dev)); - sprintf(dev->name, "Xilinx_Emaclite"); + sprintf(dev->name, "Xelite.%x", base_addr); dev->iobase = base_addr; dev->priv = 0;
Current xilinx emaclite use net multi registration but doesn't support several emaclites interfaces. Changing driver name with adding address to name is the first step how to distiguish several drivers. Signed-off-by: Michal Simek <monstr@monstr.eu> --- drivers/net/xilinx_emaclite.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)