Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325308
b: refs/heads/master
c: d6f015b
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Sep 17, 2012
1 parent 16f5848 commit ce0bb27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d24e1ac00173a5a271bf1353d4216836dab55e6
refs/heads/master: d6f015b6ad035d465d0ab30e9a441e5e8d18d4b7
14 changes: 7 additions & 7 deletions trunk/drivers/staging/comedi/drivers/mite.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define _MITE_H_

#include <linux/pci.h>
#include <linux/log2.h>
#include "../comedidev.h"

/* #define DEBUG_MITE */
Expand Down Expand Up @@ -245,8 +246,9 @@ enum MITE_IODWBSR_bits {
static inline unsigned MITE_IODWBSR_1_WSIZE_bits(unsigned size)
{
unsigned order = 0;
while (size >>= 1)
++order;

BUG_ON(size == 0);
order = ilog2(size);
BUG_ON(order < 1);
return (order - 1) & 0x1f;
}
Expand Down Expand Up @@ -393,12 +395,10 @@ static inline int CR_RL(unsigned int retry_limit)
{
int value = 0;

while (retry_limit) {
retry_limit >>= 1;
value++;
}
if (retry_limit)
value = 1 + ilog2(retry_limit);
if (value > 0x7)
printk("comedi: bug! retry_limit too large\n");
value = 0x7;
return (value & 0x7) << 21;
}

Expand Down

0 comments on commit ce0bb27

Please sign in to comment.