Release 4.12 drivers/input/evbug.c
  
  
  
/*
 *  Copyright (c) 1999-2001 Vojtech Pavlik
 */
/*
 *  Input driver event debug module - dumps all events into syslog
 */
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 * Should you need to contact me, the author, you can do so either by
 * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
 * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
 */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/input.h>
#include <linux/init.h>
#include <linux/device.h>
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_DESCRIPTION("Input driver event debug module");
MODULE_LICENSE("GPL");
static void evbug_event(struct input_handle *handle, unsigned int type, unsigned int code, int value)
{
	printk(KERN_DEBUG pr_fmt("Event. Dev: %s, Type: %d, Code: %d, Value: %d\n"),
	       dev_name(&handle->dev->dev), type, code, value);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Vojtech Pavlik | 29 | 78.38% | 1 | 50.00% | 
| Joe Perches | 8 | 21.62% | 1 | 50.00% | 
| Total | 37 | 100.00% | 2 | 100.00% | 
static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
			 const struct input_device_id *id)
{
	struct input_handle *handle;
	int error;
	handle = kzalloc(sizeof(struct input_handle), GFP_KERNEL);
	if (!handle)
		return -ENOMEM;
	handle->dev = dev;
	handle->handler = handler;
	handle->name = "evbug";
	error = input_register_handle(handle);
	if (error)
		goto err_free_handle;
	error = input_open_device(handle);
	if (error)
		goto err_unregister_handle;
	printk(KERN_DEBUG pr_fmt("Connected device: %s (%s at %s)\n"),
	       dev_name(&dev->dev),
	       dev->name ?: "unknown",
	       dev->phys ?: "unknown");
	return 0;
 err_unregister_handle:
	input_unregister_handle(handle);
 err_free_handle:
	kfree(handle);
	return error;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Vojtech Pavlik | 69 | 51.88% | 2 | 28.57% | 
| Dmitry Torokhov | 56 | 42.11% | 3 | 42.86% | 
| Joe Perches | 7 | 5.26% | 1 | 14.29% | 
| Eric Sesterhenn / Snakebyte | 1 | 0.75% | 1 | 14.29% | 
| Total | 133 | 100.00% | 7 | 100.00% | 
static void evbug_disconnect(struct input_handle *handle)
{
	printk(KERN_DEBUG pr_fmt("Disconnected device: %s\n"),
	       dev_name(&handle->dev->dev));
	input_close_device(handle);
	input_unregister_handle(handle);
	kfree(handle);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Vojtech Pavlik | 24 | 68.57% | 1 | 25.00% | 
| Dmitry Torokhov | 5 | 14.29% | 1 | 25.00% | 
| Joe Perches | 5 | 14.29% | 1 | 25.00% | 
| Kay Sievers | 1 | 2.86% | 1 | 25.00% | 
| Total | 35 | 100.00% | 4 | 100.00% | 
static const struct input_device_id evbug_ids[] = {
	{ .driver_info = 1 },	/* Matches all devices */
	{ },			/* Terminating zero entry */
};
MODULE_DEVICE_TABLE(input, evbug_ids);
static struct input_handler evbug_handler = {
	.event =	evbug_event,
	.connect =	evbug_connect,
	.disconnect =	evbug_disconnect,
	.name =		"evbug",
	.id_table =	evbug_ids,
};
static int __init evbug_init(void)
{
	return input_register_handler(&evbug_handler);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Vojtech Pavlik | 14 | 87.50% | 1 | 33.33% | 
| Adrian Bunk | 1 | 6.25% | 1 | 33.33% | 
| Dmitry Torokhov | 1 | 6.25% | 1 | 33.33% | 
| Total | 16 | 100.00% | 3 | 100.00% | 
static void __exit evbug_exit(void)
{
	input_unregister_handler(&evbug_handler);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Vojtech Pavlik | 14 | 93.33% | 1 | 50.00% | 
| Adrian Bunk | 1 | 6.67% | 1 | 50.00% | 
| Total | 15 | 100.00% | 2 | 100.00% | 
module_init(evbug_init);
module_exit(evbug_exit);
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Vojtech Pavlik | 245 | 70.81% | 3 | 20.00% | 
| Dmitry Torokhov | 64 | 18.50% | 5 | 33.33% | 
| Joe Perches | 27 | 7.80% | 1 | 6.67% | 
| Adrian Bunk | 3 | 0.87% | 2 | 13.33% | 
| Patrick Mochel | 3 | 0.87% | 1 | 6.67% | 
| Art Haas | 2 | 0.58% | 1 | 6.67% | 
| Eric Sesterhenn / Snakebyte | 1 | 0.29% | 1 | 6.67% | 
| Kay Sievers | 1 | 0.29% | 1 | 6.67% | 
| Total | 346 | 100.00% | 15 | 100.00% | 
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.