* [PATCH] dm9601: Return 0 from bind() on success
@ 2007-06-30 21:07 Peter Korsgaard
2007-07-02 12:25 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Peter Korsgaard @ 2007-06-30 21:07 UTC (permalink / raw)
To: netdev, jeff
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>
---
drivers/net/usb/dm9601.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Index: linux-2.6.22-rc6/drivers/net/usb/dm9601.c
===================================================================
--- linux-2.6.22-rc6.orig/drivers/net/usb/dm9601.c
+++ linux-2.6.22-rc6/drivers/net/usb/dm9601.c
@@ -414,18 +414,16 @@
dev->mii.reg_num_mask = 0x1f;
/* reset */
- ret = dm_write_reg(dev, DM_NET_CTRL, 1);
+ dm_write_reg(dev, DM_NET_CTRL, 1);
udelay(20);
/* read MAC */
- ret = dm_read(dev, DM_PHY_ADDR, ETH_ALEN, dev->net->dev_addr);
- if (ret < 0) {
+ if (dm_read(dev, DM_PHY_ADDR, ETH_ALEN, dev->net->dev_addr) < 0) {
printk(KERN_ERR "Error reading MAC address\n");
ret = -ENODEV;
goto out;
}
-
/* power up phy */
dm_write_reg(dev, DM_GPR_CTRL, 1);
dm_write_reg(dev, DM_GPR_DATA, 0);
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] dm9601: Return 0 from bind() on success
2007-06-30 21:07 [PATCH] dm9601: Return 0 from bind() on success Peter Korsgaard
@ 2007-07-02 12:25 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-07-02 12:25 UTC (permalink / raw)
To: Peter Korsgaard; +Cc: netdev
Peter Korsgaard wrote:
> 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>
>
> ---
> drivers/net/usb/dm9601.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-02 12:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-30 21:07 [PATCH] dm9601: Return 0 from bind() on success Peter Korsgaard
2007-07-02 12:25 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).