mmkbd: get rid of support for ancient kernels

This commit is contained in:
Lennart Poettering 2009-04-13 04:43:11 +02:00
parent f1d3dfb118
commit 66d21849e6

View file

@ -52,17 +52,6 @@ PA_MODULE_USAGE("device=<evdev device> sink=<sink name>");
#define DEFAULT_DEVICE "/dev/input/event0" #define DEFAULT_DEVICE "/dev/input/event0"
/*
* This isn't defined in older kernel headers and there is no way of
* detecting it.
*/
struct _input_id {
__u16 bustype;
__u16 vendor;
__u16 product;
__u16 version;
};
static const char* const valid_modargs[] = { static const char* const valid_modargs[] = {
"device", "device",
"sink", "sink",
@ -169,7 +158,7 @@ int pa__init(pa_module*m) {
pa_modargs *ma = NULL; pa_modargs *ma = NULL;
struct userdata *u; struct userdata *u;
int version; int version;
struct _input_id input_id; struct input_id input_id;
char name[256]; char name[256];
uint8_t evtype_bitmask[EV_MAX/8 + 1]; uint8_t evtype_bitmask[EV_MAX/8 + 1];
@ -187,8 +176,8 @@ int pa__init(pa_module*m) {
u->fd = -1; u->fd = -1;
u->fd_type = 0; u->fd_type = 0;
if ((u->fd = open(pa_modargs_get_value(ma, "device", DEFAULT_DEVICE), O_RDONLY)) < 0) { if ((u->fd = open(pa_modargs_get_value(ma, "device", DEFAULT_DEVICE), O_RDONLY|O_NOCTTY)) < 0) {
pa_log("failed to open evdev device: %s", pa_cstrerror(errno)); pa_log("Failed to open evdev device: %s", pa_cstrerror(errno));
goto fail; goto fail;
} }