mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 01:08:13 -04:00
Input: maplecontrol - set driver data before registering input device
Set maple driver data before calling input_register_device() to ensure that it is available if the device is opened immediately and the callback is triggered. Cc: stable@vger.kernel.org Assisted-by: Antigravity:gemini-3.5-flash Tested-by: Florian Fuchs <fuchsfl@gmail.com> Link: https://patch.msgid.link/akNYib9hQFNN1fA9@google.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
@@ -112,6 +112,8 @@ static int probe_maple_controller(struct device *dev)
|
||||
pad->dev = idev;
|
||||
pad->mdev = mdev;
|
||||
|
||||
maple_set_drvdata(mdev, pad);
|
||||
|
||||
idev->open = dc_pad_open;
|
||||
idev->close = dc_pad_close;
|
||||
|
||||
@@ -146,7 +148,6 @@ static int probe_maple_controller(struct device *dev)
|
||||
goto fail;
|
||||
|
||||
mdev->driver = mdrv;
|
||||
maple_set_drvdata(mdev, pad);
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user