projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fca6ca
)
Input: fix force feedback capability query example
author
Alexander Stein
<
[email protected]
>
Tue, 11 Jan 2011 09:07:09 +0000
(
01:07
-0800)
committer
Dmitry Torokhov
<
[email protected]
>
Tue, 11 Jan 2011 09:07:55 +0000
(
01:07
-0800)
'features' is a bit array, not byte array
Signed-off-by: Alexander Stein <
[email protected]
>
Acked-by: Anssi Hannula <
[email protected]
>
Signed-off-by: Dmitry Torokhov <
[email protected]
>
Documentation/input/ff.txt
patch
|
blob
|
history
diff --git
a/Documentation/input/ff.txt
b/Documentation/input/ff.txt
index ded4d5f53109d13e79aa47e277a7dde674f5c883..b3867bf49f8f9ec0743e3cc9384d8ed45449a972 100644
(file)
--- a/
Documentation/input/ff.txt
+++ b/
Documentation/input/ff.txt
@@
-49,7
+49,9
@@
This information is subject to change.
#include <linux/input.h>
#include <sys/ioctl.h>
-unsigned long features[1 + FF_MAX/sizeof(unsigned long)];
+#define BITS_TO_LONGS(x) \
+ (((x) + 8 * sizeof (unsigned long) - 1) / (8 * sizeof (unsigned long)))
+unsigned long features[BITS_TO_LONGS(FF_CNT)];
int ioctl(int file_descriptor, int request, unsigned long *features);
"request" must be EVIOCGBIT(EV_FF, size of features array in bytes )