* [PATCH] Input: maplecontrol - set driver data before registering input device
@ 2026-06-30 5:49 Dmitry Torokhov
2026-06-30 19:15 ` Florian Fuchs
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2026-06-30 5:49 UTC (permalink / raw)
To: Adrian McMenamin, linux-input; +Cc: Florian Fuchs, linux-kernel
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
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/joystick/maplecontrol.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/input/joystick/maplecontrol.c b/drivers/input/joystick/maplecontrol.c
index 7f36f73844a9..6293b6e8148b 100644
--- a/drivers/input/joystick/maplecontrol.c
+++ b/drivers/input/joystick/maplecontrol.c
@@ -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;
--
2.55.0.rc0.799.gd6f94ed593-goog
--
Dmitry
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Input: maplecontrol - set driver data before registering input device
2026-06-30 5:49 [PATCH] Input: maplecontrol - set driver data before registering input device Dmitry Torokhov
@ 2026-06-30 19:15 ` Florian Fuchs
0 siblings, 0 replies; 2+ messages in thread
From: Florian Fuchs @ 2026-06-30 19:15 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Adrian McMenamin, linux-input, linux-kernel
On 29 Jun 22:49, Dmitry Torokhov wrote:
> 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
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> drivers/input/joystick/maplecontrol.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/joystick/maplecontrol.c b/drivers/input/joystick/maplecontrol.c
> index 7f36f73844a9..6293b6e8148b 100644
> --- a/drivers/input/joystick/maplecontrol.c
> +++ b/drivers/input/joystick/maplecontrol.c
> @@ -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;
>
> --
> 2.55.0.rc0.799.gd6f94ed593-goog
>
>
> --
> Dmitry
Tested-by: Florian Fuchs <fuchsfl@gmail.com>
Regards
Florian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-30 19:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-30 5:49 [PATCH] Input: maplecontrol - set driver data before registering input device Dmitry Torokhov
2026-06-30 19:15 ` Florian Fuchs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox