/* Completes a request by converting the data into events for the input subsystem.  */
static void report_key(struct cm109_dev *dev, int key)
/* Completes a request by converting the data into events for the input subsystem.  */
static void report_key(struct cm109_dev *dev, int key)
{
	struct input_dev *idev = dev->idev;
	if (dev->key_code >= 0) {
		input_report_key(idev, dev->key_code, 0);
	}
	dev->key_code = key;
	if (key >= 0) {
		input_report_key(idev, key, 1);
	}
	input_sync(idev);
}