Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1336bff authored by Alexander Stein's avatar Alexander Stein Committed by Dmitry Torokhov
Browse files

Input: fix force feedback capability query example



'features' is a bit array, not byte array

Signed-off-by: default avatarAlexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Acked-by: default avatarAnssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 5fca6cac
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 )