1 Index: linux-2.6.21.4/drivers/net/phy/fixed.c
2 ===================================================================
3 --- linux-2.6.21.4.orig/drivers/net/phy/fixed.c 2007-06-11 16:30:06.418483448 +0200
4 +++ linux-2.6.21.4/drivers/net/phy/fixed.c 2007-06-11 16:30:11.156763120 +0200
6 .driver = { .owner = THIS_MODULE,},
9 +static void fixed_mdio_release (struct device * dev)
11 + struct phy_device *phydev = container_of(dev, struct phy_device, dev);
12 + struct mii_bus *bus = phydev->bus;
13 + struct fixed_info *fixed = bus->priv;
22 /*-----------------------------------------------------------------------------
23 * This func is used to create all the necessary stuff, bind
24 * the fixed phy driver and register all it on the mdio_bus_type.
28 fixed->regs = kzalloc(MII_REGS_NUM*sizeof(int), GFP_KERNEL);
29 + if (NULL == fixed->regs) {
35 fixed->regs_num = MII_REGS_NUM;
36 fixed->phy_status.speed = speed;
37 fixed->phy_status.duplex = duplex;
39 fixed->phydev = phydev;
43 - goto device_create_fail;
51 phydev->irq = PHY_IGNORE_INTERRUPT;
54 snprintf(phydev->dev.bus_id, BUS_ID_SIZE,
55 "fixed@%d:%d", speed, duplex);
57 phydev->bus = new_bus;
60 + phydev->dev.driver = &fixed_mdio_driver.driver;
61 + phydev->dev.release = fixed_mdio_release;
63 + err = phydev->dev.driver->probe(&phydev->dev);
65 + printk(KERN_ERR "Phy %s: problems with fixed driver\n",
66 + phydev->dev.bus_id);
75 + err = device_register(&phydev->dev);
77 + printk(KERN_ERR "Phy %s failed to register\n",
78 + phydev->dev.bus_id);
83 err = device_register(&phydev->dev);
85 printk(KERN_ERR "Phy %s failed to register\n",