kfree(to_mdio_device(dev));
}
-static int mdio_device_bus_match(struct device *dev,
- const struct device_driver *drv)
-{
- struct mdio_device *mdiodev = to_mdio_device(dev);
- const struct mdio_driver *mdiodrv = to_mdio_driver(drv);
-
- if (mdiodrv->mdiodrv.flags & MDIO_DEVICE_IS_PHY)
- return 0;
-
- return strcmp(mdiodev->modalias, drv->name) == 0;
-}
-
struct mdio_device *mdio_device_create(struct mii_bus *bus, int addr)
{
struct mdio_device *mdiodev;
mdiodev->dev.release = mdio_device_release;
mdiodev->dev.parent = &bus->dev;
mdiodev->dev.bus = &mdio_bus_type;
- mdiodev->bus_match = mdio_device_bus_match;
mdiodev->device_free = mdio_device_free;
mdiodev->device_remove = mdio_device_remove;
mdiodev->bus = bus;
struct device dev;
struct mii_bus *bus;
- char modalias[MDIO_NAME_SIZE];
int (*bus_match)(struct device *dev, const struct device_driver *drv);
void (*device_free)(struct mdio_device *mdiodev);
kernel_ulong_t driver_data;
};
-#define MDIO_NAME_SIZE 32
#define MDIO_MODULE_PREFIX "mdio:"
#define MDIO_ID_FMT "%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u"