svn commit: r269264 - user/jceel/soc2014_evdev/head/sys/dev/evdev
Jakub Wojciech Klama
jceel at FreeBSD.org
Tue Jul 29 21:22:34 UTC 2014
Author: jceel
Date: Tue Jul 29 21:22:33 2014
New Revision: 269264
URL: http://svnweb.freebsd.org/changeset/base/269264
Log:
Don't assume 64-bit long.
Modified:
user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.c
user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.h
Modified: user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.c
==============================================================================
--- user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.c Tue Jul 29 21:21:16 2014 (r269263)
+++ user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.c Tue Jul 29 21:22:33 2014 (r269264)
@@ -66,13 +66,13 @@ static void evdev_client_push(struct evd
static inline void
set_bit(unsigned long *array, int bit)
{
- array[bit / 64] |= (1LL << (bit % 64));
+ array[bit / LONG_WIDTH] |= (1LL << (bit % LONG_WIDTH));
}
static inline void
clr_bit(unsigned long *array, int bit)
{
- array[bit / 64] &= ~(1LL << (bit % 64));
+ array[bit / LONG_WIDTH] &= ~(1LL << (bit % LONG_WIDTH));
}
static inline void
Modified: user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.h
==============================================================================
--- user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.h Tue Jul 29 21:21:16 2014 (r269263)
+++ user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.h Tue Jul 29 21:22:33 2014 (r269264)
@@ -34,6 +34,7 @@
#include <dev/evdev/input.h>
#define NAMELEN 80
+#define LONG_WIDTH (sizeof(unsigned long) * 8)
#define nlongs(x) (howmany(x, sizeof(unsigned long) * 8))
MALLOC_DECLARE(M_EVDEV);
More information about the svn-src-user
mailing list