aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 11:13:10 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 11:13:10 -0500
commitbb592cf474404e51cbf3c419fb72fda83c4b7d72 (patch)
tree05823f536d5f095857a7aff732e205d249e4b7a1 /drivers/ieee1394
parent79c9601c2e0dbbe69895d302de4d19f3a31fbd30 (diff)
parentaf0940dac37545b1e7900b19c464fb6367d3f82f (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: ieee1394: Use hweight32 firewire: cdev: reduce stack usage by ioctl_dispatch firewire: ohci: 0 may be a valid DMA address firewire: core: WARN on wrong usage of core transaction functions firewire: core: optimize Topology Map creation firewire: core: clarify generate_config_rom usage firewire: optimize config ROM creation firewire: cdev: normalize variable names firewire: normalize style of queue_work wrappers firewire: cdev: fix memory leak in an error path
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r--drivers/ieee1394/ohci1394.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
index 65c1429e4129..d0dc1db80b29 100644
--- a/drivers/ieee1394/ohci1394.c
+++ b/drivers/ieee1394/ohci1394.c
@@ -82,6 +82,7 @@
82 * 82 *
83 */ 83 */
84 84
85#include <linux/bitops.h>
85#include <linux/kernel.h> 86#include <linux/kernel.h>
86#include <linux/list.h> 87#include <linux/list.h>
87#include <linux/slab.h> 88#include <linux/slab.h>
@@ -434,7 +435,6 @@ static void initialize_dma_trm_ctx(struct dma_trm_ctx *d)
434/* Count the number of available iso contexts */ 435/* Count the number of available iso contexts */
435static int get_nb_iso_ctx(struct ti_ohci *ohci, int reg) 436static int get_nb_iso_ctx(struct ti_ohci *ohci, int reg)
436{ 437{
437 int i,ctx=0;
438 u32 tmp; 438 u32 tmp;
439 439
440 reg_write(ohci, reg, 0xffffffff); 440 reg_write(ohci, reg, 0xffffffff);
@@ -443,11 +443,7 @@ static int get_nb_iso_ctx(struct ti_ohci *ohci, int reg)
443 DBGMSG("Iso contexts reg: %08x implemented: %08x", reg, tmp); 443 DBGMSG("Iso contexts reg: %08x implemented: %08x", reg, tmp);
444 444
445 /* Count the number of contexts */ 445 /* Count the number of contexts */
446 for (i=0; i<32; i++) { 446 return hweight32(tmp);
447 if (tmp & 1) ctx++;
448 tmp >>= 1;
449 }
450 return ctx;
451} 447}
452 448
453/* Global initialization */ 449/* Global initialization */