Re: [RFC 1/1 v2] Input: Add ps2emu module
From: Greg KH <gregkh@linuxfoundation.org>
Date: 2015-07-21 19:57:12
Also in:
linux-api, lkml
On Tue, Jul 21, 2015 at 03:47:17PM -0400, Stephen Chandler Paul wrote:
Debugging input devices, specifically laptop touchpads, can be tricky without having the physical device handy. Here we try to remedy that with ps2emu. This module allows an application to connect to a character device provided by the kernel, and simulate any PS/2 device. In combination with userspace programs that can record PS/2 devices and replay them through the /dev/ps2emu device, this allows developers to debug driver issues on the PS/2 level with devices simply by requesting a recording from the user experiencing the issue without having to have the physical hardware in front of them. Signed-off-by: Stephen Chandler Paul <redacted> Reviewed-by: Benjamin Tissoires <redacted> --- Changes * Remove PS2EMU_MINOR, use MISC_DYNAMIC_MINOR * Remove ps2emu_warn(), just use dev_warn() * Don't return value from copy_to_user(), return -EFAULT * Remove usages of unlikely() * Remove call to nonseekable_open() Things I didn't change * Didn't rename this_device, I might have misinterpreted what you were saying but this_device is a member of a struct that isn't defined in any of my own patches. I could have renamed ps2emu_misc and ps2emu_fops to misc and fops, but I'm guessing that's the wrong thing to do if I go off the style of the other driver files in the kernel tree (in drivers/input, anyway).
Sorry, you are right, this is a structure that you don't have control over. Thanks for the other changes, looks good to me. greg k-h