mirror of
https://github.com/adulau/aha.git
synced 2025-01-03 22:53:18 +00:00
dm9601: Return 0 from bind() on success
Fixup dm9601_bind() so it returns 0 on success rather than just a positive number, as otherwise usbnet doesn't init the status handler. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
043600a62a
commit
b8f59586ce
1 changed files with 2 additions and 4 deletions
|
@ -414,18 +414,16 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
|
||||||
dev->mii.reg_num_mask = 0x1f;
|
dev->mii.reg_num_mask = 0x1f;
|
||||||
|
|
||||||
/* reset */
|
/* reset */
|
||||||
ret = dm_write_reg(dev, DM_NET_CTRL, 1);
|
dm_write_reg(dev, DM_NET_CTRL, 1);
|
||||||
udelay(20);
|
udelay(20);
|
||||||
|
|
||||||
/* read MAC */
|
/* read MAC */
|
||||||
ret = dm_read(dev, DM_PHY_ADDR, ETH_ALEN, dev->net->dev_addr);
|
if (dm_read(dev, DM_PHY_ADDR, ETH_ALEN, dev->net->dev_addr) < 0) {
|
||||||
if (ret < 0) {
|
|
||||||
printk(KERN_ERR "Error reading MAC address\n");
|
printk(KERN_ERR "Error reading MAC address\n");
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* power up phy */
|
/* power up phy */
|
||||||
dm_write_reg(dev, DM_GPR_CTRL, 1);
|
dm_write_reg(dev, DM_GPR_CTRL, 1);
|
||||||
dm_write_reg(dev, DM_GPR_DATA, 0);
|
dm_write_reg(dev, DM_GPR_DATA, 0);
|
||||||
|
|
Loading…
Reference in a new issue