I am writing a kernel module that needs to perform the equivalent of an ioctl on another device (the "target" device). The target device is an input device which is mounted at dev/something.
I know that one way to do this would be to open the target device from my module and then just call ioctl as described in this SO question. However I understand that this is a hack and that there is probably a better way.
Is it possible to retrieve to a struct *input_dev
from my kernel module, given either the target module name or the mount point of the target device?