/* Lookup the mii_dev struct by the registered device name.  */
struct mii_dev* miiphy_get_dev_by_name(const char *devname)
/* Lookup the mii_dev struct by the registered device name.  */
struct mii_dev* miiphy_get_dev_by_name(const char *devname)
{
	struct list_head *entry;
	struct mii_dev *dev;
	if (!devname) {
		printf("NULL device name!\n");
		return NULL;
	}
	list_for_each(entry, &mii_devs) {
		dev = list_entry(entry, struct mii_dev, link);
		if (strcmp(dev->name, devname) == 0)
			return dev;
	}
	return NULL;
}