Commit e0d7ff16 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input

parents ca49a601 33fdfa97
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -198,10 +198,10 @@ int setkeycode(unsigned int scancode, unsigned int keycode)

	if (scancode >= dev->keycodemax)
		return -EINVAL;
	if (keycode > KEY_MAX)
		return -EINVAL;
	if (keycode < 0 || keycode > KEY_MAX)
		return -EINVAL;
	if (keycode >> (dev->keycodesize * 8))
		return -EINVAL;

	oldkey = SET_INPUT_KEYCODE(dev, scancode, keycode);

+65 −81
Original line number Diff line number Diff line
@@ -439,6 +439,11 @@ static struct {
	{ 0, 0 },
};

struct sonypi_keypress {
	struct input_dev *dev;
	int key;
};

static struct sonypi_device {
	struct pci_dev *dev;
	struct platform_device *pdev;
@@ -710,22 +715,61 @@ static void sonypi_setbluetoothpower(u8 state)

static void input_keyrelease(void *data)
{
	struct input_dev *input_dev;
	int key;

	while (1) {
		if (kfifo_get(sonypi_device.input_fifo,
			      (unsigned char *)&input_dev,
			      sizeof(input_dev)) != sizeof(input_dev))
			return;
		if (kfifo_get(sonypi_device.input_fifo,
			      (unsigned char *)&key,
			      sizeof(key)) != sizeof(key))
			return;
	struct sonypi_keypress kp;

	while (kfifo_get(sonypi_device.input_fifo, (unsigned char *)&kp,
			 sizeof(kp)) == sizeof(kp)) {
		msleep(10);
		input_report_key(input_dev, key, 0);
		input_sync(input_dev);
		input_report_key(kp.dev, kp.key, 0);
		input_sync(kp.dev);
	}
}

static void sonypi_report_input_event(u8 event)
{
	struct input_dev *jog_dev = &sonypi_device.input_jog_dev;
	struct input_dev *key_dev = &sonypi_device.input_key_dev;
	struct sonypi_keypress kp = { NULL };
	int i;

	switch (event) {
	case SONYPI_EVENT_JOGDIAL_UP:
	case SONYPI_EVENT_JOGDIAL_UP_PRESSED:
		input_report_rel(jog_dev, REL_WHEEL, 1);
		input_sync(jog_dev);
		break;

	case SONYPI_EVENT_JOGDIAL_DOWN:
	case SONYPI_EVENT_JOGDIAL_DOWN_PRESSED:
		input_report_rel(jog_dev, REL_WHEEL, -1);
		input_sync(jog_dev);
		break;

	case SONYPI_EVENT_JOGDIAL_PRESSED:
		kp.key = BTN_MIDDLE;
		kp.dev = jog_dev;
		break;

	case SONYPI_EVENT_FNKEY_RELEASED:
		/* Nothing, not all VAIOs generate this event */
		break;

	default:
		for (i = 0; sonypi_inputkeys[i].sonypiev; i++)
			if (event == sonypi_inputkeys[i].sonypiev) {
				kp.dev = key_dev;
				kp.key = sonypi_inputkeys[i].inputev;
				break;
			}
		break;
	}

	if (kp.dev) {
		input_report_key(kp.dev, kp.key, 1);
		input_sync(kp.dev);
		kfifo_put(sonypi_device.input_fifo,
			  (unsigned char *)&kp, sizeof(kp));
		schedule_work(&sonypi_device.input_work);
	}
}

@@ -768,51 +812,8 @@ found:
		printk(KERN_INFO
		       "sonypi: event port1=0x%02x,port2=0x%02x\n", v1, v2);

	if (useinput) {
		struct input_dev *input_jog_dev = &sonypi_device.input_jog_dev;
		struct input_dev *input_key_dev = &sonypi_device.input_key_dev;
		switch (event) {
		case SONYPI_EVENT_JOGDIAL_UP:
		case SONYPI_EVENT_JOGDIAL_UP_PRESSED:
			input_report_rel(input_jog_dev, REL_WHEEL, 1);
			break;
		case SONYPI_EVENT_JOGDIAL_DOWN:
		case SONYPI_EVENT_JOGDIAL_DOWN_PRESSED:
			input_report_rel(input_jog_dev, REL_WHEEL, -1);
			break;
		case SONYPI_EVENT_JOGDIAL_PRESSED: {
			int key = BTN_MIDDLE;
			input_report_key(input_jog_dev, key, 1);
			kfifo_put(sonypi_device.input_fifo,
				  (unsigned char *)&input_jog_dev,
				  sizeof(input_jog_dev));
			kfifo_put(sonypi_device.input_fifo,
				  (unsigned char *)&key, sizeof(key));
			break;
		}
		case SONYPI_EVENT_FNKEY_RELEASED:
			/* Nothing, not all VAIOs generate this event */
			break;
		}
		input_sync(input_jog_dev);

		for (i = 0; sonypi_inputkeys[i].sonypiev; i++) {
			int key;

			if (event != sonypi_inputkeys[i].sonypiev)
				continue;

			key = sonypi_inputkeys[i].inputev;
			input_report_key(input_key_dev, key, 1);
			kfifo_put(sonypi_device.input_fifo,
				  (unsigned char *)&input_key_dev,
				  sizeof(input_key_dev));
			kfifo_put(sonypi_device.input_fifo,
				  (unsigned char *)&key, sizeof(key));
		}
		input_sync(input_key_dev);
		schedule_work(&sonypi_device.input_work);
	}
	if (useinput)
		sonypi_report_input_event(event);

	kfifo_put(sonypi_device.fifo, (unsigned char *)&event, sizeof(event));
	kill_fasync(&sonypi_device.fifo_async, SIGIO, POLL_IN);
@@ -1227,14 +1228,7 @@ static int __devinit sonypi_probe(void)
		sonypi_device.input_jog_dev.keybit[LONG(BTN_MOUSE)] =
			BIT(BTN_MIDDLE);
		sonypi_device.input_jog_dev.relbit[0] = BIT(REL_WHEEL);
		sonypi_device.input_jog_dev.name =
			kmalloc(sizeof(SONYPI_JOG_INPUTNAME), GFP_KERNEL);
		if (!sonypi_device.input_jog_dev.name) {
			printk(KERN_ERR "sonypi: kmalloc failed\n");
			ret = -ENOMEM;
			goto out_inkmallocinput1;
		}
		sprintf(sonypi_device.input_jog_dev.name, SONYPI_JOG_INPUTNAME);
		sonypi_device.input_jog_dev.name = SONYPI_JOG_INPUTNAME;
		sonypi_device.input_jog_dev.id.bustype = BUS_ISA;
		sonypi_device.input_jog_dev.id.vendor = PCI_VENDOR_ID_SONY;

@@ -1248,14 +1242,7 @@ static int __devinit sonypi_probe(void)
			if (sonypi_inputkeys[i].inputev)
				set_bit(sonypi_inputkeys[i].inputev,
					sonypi_device.input_key_dev.keybit);
		sonypi_device.input_key_dev.name =
			kmalloc(sizeof(SONYPI_KEY_INPUTNAME), GFP_KERNEL);
		if (!sonypi_device.input_key_dev.name) {
			printk(KERN_ERR "sonypi: kmalloc failed\n");
			ret = -ENOMEM;
			goto out_inkmallocinput2;
		}
		sprintf(sonypi_device.input_key_dev.name, SONYPI_KEY_INPUTNAME);
		sonypi_device.input_key_dev.name = SONYPI_KEY_INPUTNAME;
		sonypi_device.input_key_dev.id.bustype = BUS_ISA;
		sonypi_device.input_key_dev.id.vendor = PCI_VENDOR_ID_SONY;

@@ -1313,11 +1300,7 @@ out_platformdev:
	kfifo_free(sonypi_device.input_fifo);
out_infifo:
	input_unregister_device(&sonypi_device.input_key_dev);
	kfree(sonypi_device.input_key_dev.name);
out_inkmallocinput2:
	input_unregister_device(&sonypi_device.input_jog_dev);
	kfree(sonypi_device.input_jog_dev.name);
out_inkmallocinput1:
	free_irq(sonypi_device.irq, sonypi_irq);
out_reqirq:
	release_region(sonypi_device.ioport1, sonypi_device.region_size);
@@ -1337,13 +1320,14 @@ static void __devexit sonypi_remove(void)
{
	sonypi_disable();

	synchronize_sched();  /* Allow sonypi interrupt to complete. */
	flush_scheduled_work();

	platform_device_unregister(sonypi_device.pdev);

	if (useinput) {
		input_unregister_device(&sonypi_device.input_key_dev);
		kfree(sonypi_device.input_key_dev.name);
		input_unregister_device(&sonypi_device.input_jog_dev);
		kfree(sonypi_device.input_jog_dev.name);
		kfifo_free(sonypi_device.input_fifo);
	}

+1 −0
Original line number Diff line number Diff line
@@ -320,6 +320,7 @@ static long evdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
			if (t < 0 || t >= dev->keycodemax || !dev->keycodesize) return -EINVAL;
			if (get_user(v, ip + 1)) return -EFAULT;
			if (v < 0 || v > KEY_MAX) return -EINVAL;
			if (v >> (dev->keycodesize * 8)) return -EINVAL;
			u = SET_INPUT_KEYCODE(dev, t, v);
			clear_bit(u, dev->keybit);
			set_bit(v, dev->keybit);
+198 −191
Original line number Diff line number Diff line
@@ -48,12 +48,6 @@ static LIST_HEAD(input_handler_list);

static struct input_handler *input_table[8];

#ifdef CONFIG_PROC_FS
static struct proc_dir_entry *proc_bus_input_dir;
static DECLARE_WAIT_QUEUE_HEAD(input_devices_poll_wait);
static int input_devices_state;
#endif

void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
{
	struct input_handle *handle;
@@ -312,6 +306,7 @@ static struct input_device_id *input_match_device(struct input_device_id *id, st
	return NULL;
}


/*
 * Input hotplugging interface - loading event handlers based on
 * device bitfields.
@@ -428,6 +423,177 @@ static void input_call_hotplug(char *verb, struct input_dev *dev)

#endif

#ifdef CONFIG_PROC_FS

static struct proc_dir_entry *proc_bus_input_dir;
static DECLARE_WAIT_QUEUE_HEAD(input_devices_poll_wait);
static int input_devices_state;

static inline void input_wakeup_procfs_readers(void)
{
	input_devices_state++;
	wake_up(&input_devices_poll_wait);
}

static unsigned int input_devices_poll(struct file *file, poll_table *wait)
{
	int state = input_devices_state;
	poll_wait(file, &input_devices_poll_wait, wait);
	if (state != input_devices_state)
		return POLLIN | POLLRDNORM;
	return 0;
}

#define SPRINTF_BIT_B(bit, name, max) \
	do { \
		len += sprintf(buf + len, "B: %s", name); \
		for (i = NBITS(max) - 1; i >= 0; i--) \
			if (dev->bit[i]) break; \
		for (; i >= 0; i--) \
			len += sprintf(buf + len, "%lx ", dev->bit[i]); \
		len += sprintf(buf + len, "\n"); \
	} while (0)

#define SPRINTF_BIT_B2(bit, name, max, ev) \
	do { \
		if (test_bit(ev, dev->evbit)) \
			SPRINTF_BIT_B(bit, name, max); \
	} while (0)

static int input_devices_read(char *buf, char **start, off_t pos, int count, int *eof, void *data)
{
	struct input_dev *dev;
	struct input_handle *handle;

	off_t at = 0;
	int i, len, cnt = 0;

	list_for_each_entry(dev, &input_dev_list, node) {

		len = sprintf(buf, "I: Bus=%04x Vendor=%04x Product=%04x Version=%04x\n",
			dev->id.bustype, dev->id.vendor, dev->id.product, dev->id.version);

		len += sprintf(buf + len, "N: Name=\"%s\"\n", dev->name ? dev->name : "");
		len += sprintf(buf + len, "P: Phys=%s\n", dev->phys ? dev->phys : "");
		len += sprintf(buf + len, "H: Handlers=");

		list_for_each_entry(handle, &dev->h_list, d_node)
			len += sprintf(buf + len, "%s ", handle->name);

		len += sprintf(buf + len, "\n");

		SPRINTF_BIT_B(evbit, "EV=", EV_MAX);
		SPRINTF_BIT_B2(keybit, "KEY=", KEY_MAX, EV_KEY);
		SPRINTF_BIT_B2(relbit, "REL=", REL_MAX, EV_REL);
		SPRINTF_BIT_B2(absbit, "ABS=", ABS_MAX, EV_ABS);
		SPRINTF_BIT_B2(mscbit, "MSC=", MSC_MAX, EV_MSC);
		SPRINTF_BIT_B2(ledbit, "LED=", LED_MAX, EV_LED);
		SPRINTF_BIT_B2(sndbit, "SND=", SND_MAX, EV_SND);
		SPRINTF_BIT_B2(ffbit,  "FF=",  FF_MAX, EV_FF);

		len += sprintf(buf + len, "\n");

		at += len;

		if (at >= pos) {
			if (!*start) {
				*start = buf + (pos - (at - len));
				cnt = at - pos;
			} else  cnt += len;
			buf += len;
			if (cnt >= count)
				break;
		}
	}

	if (&dev->node == &input_dev_list)
		*eof = 1;

	return (count > cnt) ? cnt : count;
}

static int input_handlers_read(char *buf, char **start, off_t pos, int count, int *eof, void *data)
{
	struct input_handler *handler;

	off_t at = 0;
	int len = 0, cnt = 0;
	int i = 0;

	list_for_each_entry(handler, &input_handler_list, node) {

		if (handler->fops)
			len = sprintf(buf, "N: Number=%d Name=%s Minor=%d\n",
				i++, handler->name, handler->minor);
		else
			len = sprintf(buf, "N: Number=%d Name=%s\n",
				i++, handler->name);

		at += len;

		if (at >= pos) {
			if (!*start) {
				*start = buf + (pos - (at - len));
				cnt = at - pos;
			} else  cnt += len;
			buf += len;
			if (cnt >= count)
				break;
		}
	}
	if (&handler->node == &input_handler_list)
		*eof = 1;

	return (count > cnt) ? cnt : count;
}

static struct file_operations input_fileops;

static int __init input_proc_init(void)
{
	struct proc_dir_entry *entry;

	proc_bus_input_dir = proc_mkdir("input", proc_bus);
	if (!proc_bus_input_dir)
		return -ENOMEM;

	proc_bus_input_dir->owner = THIS_MODULE;

	entry = create_proc_read_entry("devices", 0, proc_bus_input_dir, input_devices_read, NULL);
	if (!entry)
		goto fail1;

	entry->owner = THIS_MODULE;
	input_fileops = *entry->proc_fops;
	entry->proc_fops = &input_fileops;
	entry->proc_fops->poll = input_devices_poll;

	entry = create_proc_read_entry("handlers", 0, proc_bus_input_dir, input_handlers_read, NULL);
	if (!entry)
		goto fail2;

	entry->owner = THIS_MODULE;

	return 0;

 fail2:	remove_proc_entry("devices", proc_bus_input_dir);
 fail1: remove_proc_entry("input", proc_bus);
	return -ENOMEM;
}

static void input_proc_exit(void)
{
	remove_proc_entry("devices", proc_bus_input_dir);
	remove_proc_entry("handlers", proc_bus_input_dir);
	remove_proc_entry("input", proc_bus);
}

#else /* !CONFIG_PROC_FS */
static inline void input_wakeup_procfs_readers(void) { }
static inline int input_proc_init(void) { return 0; }
static inline void input_proc_exit(void) { }
#endif

void input_register_device(struct input_dev *dev)
{
	struct input_handle *handle;
@@ -464,10 +630,7 @@ void input_register_device(struct input_dev *dev)
	input_call_hotplug("add", dev);
#endif

#ifdef CONFIG_PROC_FS
	input_devices_state++;
	wake_up(&input_devices_poll_wait);
#endif
	input_wakeup_procfs_readers();
}

void input_unregister_device(struct input_dev *dev)
@@ -491,10 +654,7 @@ void input_unregister_device(struct input_dev *dev)

	list_del_init(&dev->node);

#ifdef CONFIG_PROC_FS
	input_devices_state++;
	wake_up(&input_devices_poll_wait);
#endif
	input_wakeup_procfs_readers();
}

void input_register_handler(struct input_handler *handler)
@@ -518,10 +678,7 @@ void input_register_handler(struct input_handler *handler)
				if ((handle = handler->connect(handler, dev, id)))
					input_link_handle(handle);

#ifdef CONFIG_PROC_FS
	input_devices_state++;
	wake_up(&input_devices_poll_wait);
#endif
	input_wakeup_procfs_readers();
}

void input_unregister_handler(struct input_handler *handler)
@@ -540,10 +697,7 @@ void input_unregister_handler(struct input_handler *handler)
	if (handler->fops != NULL)
		input_table[handler->minor >> 5] = NULL;

#ifdef CONFIG_PROC_FS
	input_devices_state++;
	wake_up(&input_devices_poll_wait);
#endif
	input_wakeup_procfs_readers();
}

static int input_open_file(struct inode *inode, struct file *file)
@@ -582,190 +736,43 @@ static struct file_operations input_fops = {
	.open = input_open_file,
};

#ifdef CONFIG_PROC_FS

#define SPRINTF_BIT_B(bit, name, max) \
	do { \
		len += sprintf(buf + len, "B: %s", name); \
		for (i = NBITS(max) - 1; i >= 0; i--) \
			if (dev->bit[i]) break; \
		for (; i >= 0; i--) \
			len += sprintf(buf + len, "%lx ", dev->bit[i]); \
		len += sprintf(buf + len, "\n"); \
	} while (0)

#define SPRINTF_BIT_B2(bit, name, max, ev) \
	do { \
		if (test_bit(ev, dev->evbit)) \
			SPRINTF_BIT_B(bit, name, max); \
	} while (0)


static unsigned int input_devices_poll(struct file *file, poll_table *wait)
{
	int state = input_devices_state;
	poll_wait(file, &input_devices_poll_wait, wait);
	if (state != input_devices_state)
		return POLLIN | POLLRDNORM;
	return 0;
}
struct class *input_class;

static int input_devices_read(char *buf, char **start, off_t pos, int count, int *eof, void *data)
static int __init input_init(void)
{
	struct input_dev *dev;
	struct input_handle *handle;

	off_t at = 0;
	int i, len, cnt = 0;

	list_for_each_entry(dev, &input_dev_list, node) {

		len = sprintf(buf, "I: Bus=%04x Vendor=%04x Product=%04x Version=%04x\n",
			dev->id.bustype, dev->id.vendor, dev->id.product, dev->id.version);

		len += sprintf(buf + len, "N: Name=\"%s\"\n", dev->name ? dev->name : "");
		len += sprintf(buf + len, "P: Phys=%s\n", dev->phys ? dev->phys : "");
		len += sprintf(buf + len, "H: Handlers=");

		list_for_each_entry(handle, &dev->h_list, d_node)
			len += sprintf(buf + len, "%s ", handle->name);

		len += sprintf(buf + len, "\n");

		SPRINTF_BIT_B(evbit, "EV=", EV_MAX);
		SPRINTF_BIT_B2(keybit, "KEY=", KEY_MAX, EV_KEY);
		SPRINTF_BIT_B2(relbit, "REL=", REL_MAX, EV_REL);
		SPRINTF_BIT_B2(absbit, "ABS=", ABS_MAX, EV_ABS);
		SPRINTF_BIT_B2(mscbit, "MSC=", MSC_MAX, EV_MSC);
		SPRINTF_BIT_B2(ledbit, "LED=", LED_MAX, EV_LED);
		SPRINTF_BIT_B2(sndbit, "SND=", SND_MAX, EV_SND);
		SPRINTF_BIT_B2(ffbit,  "FF=",  FF_MAX, EV_FF);

		len += sprintf(buf + len, "\n");

		at += len;

		if (at >= pos) {
			if (!*start) {
				*start = buf + (pos - (at - len));
				cnt = at - pos;
			} else  cnt += len;
			buf += len;
			if (cnt >= count)
				break;
		}
	}

	if (&dev->node == &input_dev_list)
		*eof = 1;
	int err;

	return (count > cnt) ? cnt : count;
	input_class = class_create(THIS_MODULE, "input");
	if (IS_ERR(input_class)) {
		printk(KERN_ERR "input: unable to register input class\n");
		return PTR_ERR(input_class);
	}

static int input_handlers_read(char *buf, char **start, off_t pos, int count, int *eof, void *data)
{
	struct input_handler *handler;

	off_t at = 0;
	int len = 0, cnt = 0;
	int i = 0;

	list_for_each_entry(handler, &input_handler_list, node) {

		if (handler->fops)
			len = sprintf(buf, "N: Number=%d Name=%s Minor=%d\n",
				i++, handler->name, handler->minor);
		else
			len = sprintf(buf, "N: Number=%d Name=%s\n",
				i++, handler->name);

		at += len;

		if (at >= pos) {
			if (!*start) {
				*start = buf + (pos - (at - len));
				cnt = at - pos;
			} else  cnt += len;
			buf += len;
			if (cnt >= count)
				break;
		}
	}
	if (&handler->node == &input_handler_list)
		*eof = 1;
	err = input_proc_init();
	if (err)
		goto fail1;

	return (count > cnt) ? cnt : count;
	err = register_chrdev(INPUT_MAJOR, "input", &input_fops);
	if (err) {
		printk(KERN_ERR "input: unable to register char major %d", INPUT_MAJOR);
		goto fail2;
	}

static struct file_operations input_fileops;

static int __init input_proc_init(void)
{
	struct proc_dir_entry *entry;
	err = devfs_mk_dir("input");
	if (err)
		goto fail3;

	proc_bus_input_dir = proc_mkdir("input", proc_bus);
	if (proc_bus_input_dir == NULL)
		return -ENOMEM;
	proc_bus_input_dir->owner = THIS_MODULE;
	entry = create_proc_read_entry("devices", 0, proc_bus_input_dir, input_devices_read, NULL);
	if (entry == NULL) {
		remove_proc_entry("input", proc_bus);
		return -ENOMEM;
	}
	entry->owner = THIS_MODULE;
	input_fileops = *entry->proc_fops;
	entry->proc_fops = &input_fileops;
	entry->proc_fops->poll = input_devices_poll;
	entry = create_proc_read_entry("handlers", 0, proc_bus_input_dir, input_handlers_read, NULL);
	if (entry == NULL) {
		remove_proc_entry("devices", proc_bus_input_dir);
		remove_proc_entry("input", proc_bus);
		return -ENOMEM;
	}
	entry->owner = THIS_MODULE;
	return 0;
}
#else /* !CONFIG_PROC_FS */
static inline int input_proc_init(void) { return 0; }
#endif

struct class *input_class;

static int __init input_init(void)
{
	int retval = -ENOMEM;

	input_class = class_create(THIS_MODULE, "input");
	if (IS_ERR(input_class))
		return PTR_ERR(input_class);
	input_proc_init();
	retval = register_chrdev(INPUT_MAJOR, "input", &input_fops);
	if (retval) {
		printk(KERN_ERR "input: unable to register char major %d", INPUT_MAJOR);
		remove_proc_entry("devices", proc_bus_input_dir);
		remove_proc_entry("handlers", proc_bus_input_dir);
		remove_proc_entry("input", proc_bus);
		class_destroy(input_class);
		return retval;
	}

	retval = devfs_mk_dir("input");
	if (retval) {
		remove_proc_entry("devices", proc_bus_input_dir);
		remove_proc_entry("handlers", proc_bus_input_dir);
		remove_proc_entry("input", proc_bus);
		unregister_chrdev(INPUT_MAJOR, "input");
		class_destroy(input_class);
	}
	return retval;
 fail3:	unregister_chrdev(INPUT_MAJOR, "input");
 fail2:	input_proc_exit();
 fail1:	class_destroy(input_class);
	return err;
}

static void __exit input_exit(void)
{
	remove_proc_entry("devices", proc_bus_input_dir);
	remove_proc_entry("handlers", proc_bus_input_dir);
	remove_proc_entry("input", proc_bus);

	input_proc_exit();
	devfs_remove("input");
	unregister_chrdev(INPUT_MAJOR, "input");
	class_destroy(input_class);
+2 −4
Original line number Diff line number Diff line
@@ -37,8 +37,6 @@ MODULE_LICENSE("GPL");
#define JOYDEV_MINORS		16
#define JOYDEV_BUFFER_SIZE	64

#define MSECS(t)	(1000 * ((t) / HZ) + 1000 * ((t) % HZ) / HZ)

struct joydev {
	int exist;
	int open;
@@ -117,7 +115,7 @@ static void joydev_event(struct input_handle *handle, unsigned int type, unsigne
			return;
	}

	event.time = MSECS(jiffies);
	event.time = jiffies_to_msecs(jiffies);

	list_for_each_entry(list, &joydev->list, node) {

@@ -245,7 +243,7 @@ static ssize_t joydev_read(struct file *file, char __user *buf, size_t count, lo

		struct js_event event;

		event.time = MSECS(jiffies);
		event.time = jiffies_to_msecs(jiffies);

		if (list->startup < joydev->nkey) {
			event.type = JS_EVENT_BUTTON | JS_EVENT_INIT;
Loading