lkml.org 
[lkml]   [2008]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: use of preempt_count instead of in_atomic() at leds-gpio.c
Date
On Thursday 20 March 2008, Andrew Morton wrote:
> ./drivers/net/usb/pegasus.c
>
>   Possibly buggy: deadlockable (I assume)

Looks just unecessary to me ... ethtool MII ops get called from
a task context, as I recall, and other drivers just rely on that.

- Dave

========= CUT HERE
Remove superfluous in-atomic() check; ethtool MII ops are called
from task context.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
drivers/net/usb/pegasus.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

--- g26.orig/drivers/net/usb/pegasus.c 2008-03-21 08:53:28.000000000 -0700
+++ g26/drivers/net/usb/pegasus.c 2008-03-21 08:54:07.000000000 -0700
@@ -1128,12 +1128,8 @@ pegasus_get_settings(struct net_device *
{
pegasus_t *pegasus;

- if (in_atomic())
- return 0;
-
pegasus = netdev_priv(dev);
mii_ethtool_gset(&pegasus->mii, ecmd);
-
return 0;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-03-21 18:07    [W:0.074 / U:2.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site