linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: iforce - add missing vendor and product ids to the Unknown device name
@ 2022-08-28 23:56 Greg Tulli
  2022-08-29  9:45 ` [PATCH v2] " Greg Tulli
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Tulli @ 2022-08-28 23:56 UTC (permalink / raw)
  To: linux-input

An unknown iforce device is named "Unknown I-Force Device
[%04x:%04x]". The vendor and product ids should be substituted.

diff --git a/drivers/input/joystick/iforce/iforce-main.c
b/drivers/input/joystick/iforce/iforce-main.c
index b2a68bc9f0b4..6de5d06d2bd0 100644
--- a/drivers/input/joystick/iforce/iforce-main.c
+++ b/drivers/input/joystick/iforce/iforce-main.c
@@ -323,7 +323,11 @@ int iforce_init_device(struct device *parent, u16 bustype,
                        break;

        iforce->type = iforce_device + i;
-       input_dev->name = iforce->type->name;
+       if (iforce_device[i].idvendor)
+               input_dev->name = iforce->type->name;
+       else
+               input_dev->name = devm_kasprintf(parent, GFP_KERNEL,
iforce->type->name,
+                       input_dev->id.vendor, input_dev->id.product);

 /*
  * Set input device bitfields and ranges.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-29 18:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-28 23:56 [PATCH] Input: iforce - add missing vendor and product ids to the Unknown device name Greg Tulli
2022-08-29  9:45 ` [PATCH v2] " Greg Tulli
2022-08-29 18:19   ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).