diff options
Diffstat (limited to 'drivers/hid/hid-input.c')
| -rw-r--r-- | drivers/hid/hid-input.c | 16 | 
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 63855f275a38..dea9cc65bf80 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -1132,9 +1132,15 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel  	}  mapped: -	if (device->driver->input_mapped && device->driver->input_mapped(device, -				hidinput, field, usage, &bit, &max) < 0) -		goto ignore; +	if (device->driver->input_mapped && +	    device->driver->input_mapped(device, hidinput, field, usage, +					 &bit, &max) < 0) { +		/* +		 * The driver indicated that no further generic handling +		 * of the usage is desired. +		 */ +		return; +	}  	set_bit(usage->type, input->evbit); @@ -1215,9 +1221,11 @@ mapped:  		set_bit(MSC_SCAN, input->mscbit);  	} -ignore:  	return; +ignore: +	usage->type = 0; +	usage->code = 0;  }  static void hidinput_handle_scroll(struct hid_usage *usage,  | 
