Message ID | 20220419064255.2563333-1-deng.changcheng@zte.com.cn (mailing list archive) |
---|---|
State | Accepted |
Commit | 0a112e7c681ca311b241c50a75d9206f301ca21c |
Headers | show |
Series | Input: Remove unneeded variable | expand |
Ov> HID-over-I2C devices might reset on their own. Any device configuration > applied before the reset might be brought back to defaults so we need to > reconfigure to make sure the driver state is consistent. > > Add a reset callback to the hid driver structure. > Issue it if the driver implements it and the device reset gets observed. > > Signed-off-by: Angela Czubak <acz@semihalf.com> Applied, thank you.
diff --git a/drivers/input/input.c b/drivers/input/input.c index e5a668ce884d..1365c9dfb5f2 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -1793,8 +1793,6 @@ EXPORT_SYMBOL(input_reset_device); static int input_inhibit_device(struct input_dev *dev) { - int ret = 0; - mutex_lock(&dev->mutex); if (dev->inhibited) @@ -1816,7 +1814,7 @@ static int input_inhibit_device(struct input_dev *dev) out: mutex_unlock(&dev->mutex); - return ret; + return 0; } static int input_uninhibit_device(struct input_dev *dev)