lkml.org 
[lkml]   [2005]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[PATCH] SA9730 cleanup or fix
Hi,

In the SAA9730 driver the lan_saa9730_start() function always returns
zero which makes the if/return code unnecessary.

The first patch removes this check.

In case it is suspected that the lan_saa9730_start() function might be
modified in the future, causing it to be possible to return values other
then zero, then the second patch -replacing the previous one- fixes the
problem that in that case the requested irq is not being freed.

Both patches apply to 2.6.11-rc5-bk2.

With friendly regards,
Takis
--
OpenPGP key: http://lumumba.luc.ac.be/takis/takis_public_key.txt
fingerprint: 6571 13A3 33D9 3726 F728 AA98 F643 B12E ECF3 E029
diff -uprN linux-2.6.11-rc5-bk2/drivers/net/saa9730.c linux-2.6.11-rc5-bk2-pi/drivers/net/saa9730.c
--- linux-2.6.11-rc5-bk2/drivers/net/saa9730.c 2005-02-28 13:44:53.000000000 +0100
+++ linux-2.6.11-rc5-bk2-pi/drivers/net/saa9730.c 2005-02-28 13:45:23.000000000 +0100
@@ -815,9 +815,8 @@ static int lan_saa9730_open(struct net_d
evm_saa9730_enable_lan_int(lp);

/* Start the LAN controller */
- if (lan_saa9730_start(lp))
- return -1;
-
+ lan_saa9730_start(lp);
+
netif_start_queue(dev);

return 0;diff -uprN linux-2.6.11-rc5-bk2/drivers/net/saa9730.c linux-2.6.11-rc5-bk2-pi/drivers/net/saa9730.c
--- linux-2.6.11-rc5-bk2/drivers/net/saa9730.c 2005-02-28 13:44:53.000000000 +0100
+++ linux-2.6.11-rc5-bk2-pi/drivers/net/saa9730.c 2005-02-28 14:56:17.000000000 +0100
@@ -816,8 +816,11 @@ static int lan_saa9730_open(struct net_d

/* Start the LAN controller */
if (lan_saa9730_start(lp))
+ {
+ free_irq(dev->irq, (void *) dev);
return -1;
-
+ }
+
netif_start_queue(dev);

return 0;
\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.019 / U:1.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site