aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-06-25 08:46:44 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 13:00:54 -0400
commit09a9a45dc62fef5f46a0dc98a3cefdb464cc4aaa (patch)
tree6ed1877420d2af9a2ac71cbafe0c515fc257b409 /drivers
parentfb1bb34d45400f12e0a33f8c487b3795674908a7 (diff)
[PATCH] ieee1394: nodemgr: do not peek into struct semaphore
Also revert patch "frv: ieee1394 is borken on frv", as it no longer is. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: David Howells <dhowells@redhat.com> Cc: Jody McIntyre <scjody@modernduck.com> Cc: Ben Collins <bcollins@ubuntu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ieee1394/Kconfig2
-rw-r--r--drivers/ieee1394/nodemgr.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ieee1394/Kconfig b/drivers/ieee1394/Kconfig
index 79b81be67975..186737539cf5 100644
--- a/drivers/ieee1394/Kconfig
+++ b/drivers/ieee1394/Kconfig
@@ -4,7 +4,7 @@ menu "IEEE 1394 (FireWire) support"
4 4
5config IEEE1394 5config IEEE1394
6 tristate "IEEE 1394 (FireWire) support" 6 tristate "IEEE 1394 (FireWire) support"
7 depends on (PCI || BROKEN) && (BROKEN || !FRV) 7 depends on PCI || BROKEN
8 select NET 8 select NET
9 help 9 help
10 IEEE 1394 describes a high performance serial bus, which is also 10 IEEE 1394 describes a high performance serial bus, which is also
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index 948f1b8c4238..50c71e17de73 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -8,6 +8,7 @@
8 * directory of the kernel sources for details. 8 * directory of the kernel sources for details.
9 */ 9 */
10 10
11#include <linux/bitmap.h>
11#include <linux/kernel.h> 12#include <linux/kernel.h>
12#include <linux/config.h> 13#include <linux/config.h>
13#include <linux/list.h> 14#include <linux/list.h>
@@ -334,10 +335,12 @@ static ssize_t fw_show_ne_bus_options(struct device *dev, struct device_attribut
334static DEVICE_ATTR(bus_options,S_IRUGO,fw_show_ne_bus_options,NULL); 335static DEVICE_ATTR(bus_options,S_IRUGO,fw_show_ne_bus_options,NULL);
335 336
336 337
338/* tlabels_free, tlabels_allocations, tlabels_mask are read non-atomically
339 * here, therefore displayed values may be occasionally wrong. */
337static ssize_t fw_show_ne_tlabels_free(struct device *dev, struct device_attribute *attr, char *buf) 340static ssize_t fw_show_ne_tlabels_free(struct device *dev, struct device_attribute *attr, char *buf)
338{ 341{
339 struct node_entry *ne = container_of(dev, struct node_entry, device); 342 struct node_entry *ne = container_of(dev, struct node_entry, device);
340 return sprintf(buf, "%d\n", atomic_read(&ne->tpool->count.count) + 1); 343 return sprintf(buf, "%d\n", 64 - bitmap_weight(ne->tpool->pool, 64));
341} 344}
342static DEVICE_ATTR(tlabels_free,S_IRUGO,fw_show_ne_tlabels_free,NULL); 345static DEVICE_ATTR(tlabels_free,S_IRUGO,fw_show_ne_tlabels_free,NULL);
343 346