提交 e1336bff 编写于 作者: A Alexander Stein 提交者: Dmitry Torokhov

Input: fix force feedback capability query example

'features' is a bit array, not byte array
Signed-off-by: NAlexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Acked-by: NAnssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 5fca6cac
......@@ -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 )
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册