Skip to content

Commit

Permalink
HID: hidraw: warn if userspace headers are outdated
Browse files Browse the repository at this point in the history
Put a warning into sample hidraw code in samples/hidraw/hid-example.c
in case the userspace headers are missing the necessary defines and
need to be updated.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Jiri Kosina committed Mar 27, 2013
1 parent 4e55467 commit f371305
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions samples/hidraw/hid-example.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
/*
* Ugly hack to work around failing compilation on systems that don't
* yet populate new version of hidraw.h to userspace.
*
* If you need this, please have your distro update the kernel headers.
*/
#ifndef HIDIOCSFEATURE
#warning Please have your distro update the userspace kernel headers
#define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len)
#define HIDIOCGFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len)
#endif
Expand Down

0 comments on commit f371305

Please sign in to comment.