return;
}
- /* must be less than NAMESIZE (16) */
+ /* must be less than sizeof(dev->name) */
sprintf (dev->name, "mv_enet%d", devnum);
#ifdef DEBUG
return;
}
- /* must be less than NAMESIZE (16) */
+ /* must be less than sizeof(dev->name) */
sprintf (dev->name, "mv_enet%d", devnum);
#ifdef DEBUG
return;
}
- /* must be less than NAMESIZE (16) */
+ /* must be less than sizeof(dev->name) */
sprintf (dev->name, "mv_enet%d", devnum);
#ifdef DEBUG
return;
}
- /* must be less than NAMESIZE (16) */
+ /* must be less than sizeof(dev->name) */
sprintf(dev->name, "gal_enet%d", devnum);
#ifdef DEBUG
return;
}
- /* must be less than NAMESIZE (16) */
+ /* must be less than sizeof(dev->name) */
sprintf (dev->name, "mv_enet%d", devnum);
#ifdef DEBUG
/* Assign ARMADA100 Fast Ethernet Controller Base Address */
darmdfec->regs = (void *)base_addr;
- /* must be less than NAMESIZE (16) */
+ /* must be less than sizeof(dev->name) */
strcpy(dev->name, "armd-fec0");
dev->init = armdfec_init;
dev = &dmvgbe->dev;
- /* must be less than NAMESIZE (16) */
+ /* must be less than sizeof(dev->name) */
sprintf(dev->name, "egiga%d", devnum);
switch (devnum) {
#endif
struct fixed_phy_port {
- char name[NAMESIZE]; /* ethernet port name */
+ char name[16]; /* ethernet port name */
unsigned int speed; /* specified speed 10,100 or 1000 */
unsigned int duplex; /* specified duplex FULL or HALF */
};
#define BB_MII_DEVNAME "bb_miiphy"
struct bb_miiphy_bus {
- char name[NAMESIZE];
+ char name[16];
int (*init)(struct bb_miiphy_bus *bus);
int (*mdio_active)(struct bb_miiphy_bus *bus);
int (*mdio_tristate)(struct bb_miiphy_bus *bus);
*/
typedef void thand_f(void);
-#define NAMESIZE 16
-
enum eth_state_t {
ETH_STATE_INIT,
ETH_STATE_PASSIVE,
};
struct eth_device {
- char name[NAMESIZE];
+ char name[16];
unsigned char enetaddr[6];
int iobase;
int state;
#include <post.h>
-#define NAMESIZE 16
-
struct serial_device {
- char name[NAMESIZE];
+ /* enough bytes to match alignment of following func pointer */
+ char name[16];
int (*init) (void);
int (*uninit) (void);
struct eth_device *d;
static int index = 0;
- assert(strlen(dev->name) < NAMESIZE);
+ assert(strlen(dev->name) < sizeof(dev->name));
if (!eth_devices) {
eth_current = eth_devices = dev;