Input: hyperv-keyboard: Use in-place iterator API in the channel callback
authorDexuan Cui <decui@microsoft.com>
Tue, 20 Aug 2019 03:01:23 +0000 (03:01 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2019 09:33:49 +0000 (10:33 +0100)
commit1d42e40fe3c5c78ea856f3307f74f082839515fd
tree70fe26748805fb5b972e7509f6717a22372d2cba
parente02aac3edb464ff8022f3973e9681a8068c91ebc
Input: hyperv-keyboard: Use in-place iterator API in the channel callback

[ Upstream commit d09bc83640d524b8467a660db7b1d15e6562a1de ]

Simplify the ring buffer handling with the in-place API.

Also avoid the dynamic allocation and the memory leak in the channel
callback function.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/serio/hyperv-keyboard.c