mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] Input: amijoy - remove amijoy_phys
@ 2026-11-07 23:43 Thorsten Blum
  2026-11-08  4:26 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2026-11-07 23:43 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Thorsten Blum, linux-input, linux-kernel

amijoy_phys has only two entries and is only used by amijoy_init().
Select the physical path directly and remove the array.

Signed-off-by: Thorsten Blum <blum@kernel.org>
---
Changes in v2:
- Remove amijoy_phys as suggested by Dmitry
- v1: https://lore.kernel.org/r/20261107174739.369375-2-blum@kernel.org/

 drivers/input/joystick/amijoy.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/input/joystick/amijoy.c b/drivers/input/joystick/amijoy.c
index 3752dc2a2086..cfe407b56c41 100644
--- a/drivers/input/joystick/amijoy.c
+++ b/drivers/input/joystick/amijoy.c
@@ -30,7 +30,6 @@ MODULE_PARM_DESC(map, "Map of attached joysticks in form of <a>,<b> (default is
 static int amijoy_used;
 static DEFINE_MUTEX(amijoy_mutex);
 static struct input_dev *amijoy_dev[2];
-static char *amijoy_phys[2] = { "amijoy/input0", "amijoy/input1" };
 
 static irqreturn_t amijoy_interrupt(int irq, void *dummy)
 {
@@ -108,7 +107,7 @@ static int __init amijoy_init(void)
 		}
 
 		amijoy_dev[i]->name = "Amiga joystick";
-		amijoy_dev[i]->phys = amijoy_phys[i];
+		amijoy_dev[i]->phys = i ? "amijoy/input1" : "amijoy/input0";
 		amijoy_dev[i]->id.bustype = BUS_AMIGA;
 		amijoy_dev[i]->id.vendor = 0x0001;
 		amijoy_dev[i]->id.product = 0x0003;

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

* Re: [PATCH v2] Input: amijoy - remove amijoy_phys
  2026-11-07 23:43 [PATCH v2] Input: amijoy - remove amijoy_phys Thorsten Blum
@ 2026-11-08  4:26 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2026-11-08  4:26 UTC (permalink / raw)
  To: Thorsten Blum; +Cc: linux-input, linux-kernel

On Sun, Nov 08, 2026 at 12:43:47AM +0100, Thorsten Blum wrote:
> amijoy_phys has only two entries and is only used by amijoy_init().
> Select the physical path directly and remove the array.
> 
> Signed-off-by: Thorsten Blum <blum@kernel.org>

Applied, thank you.

-- 
Dmitry

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

end of thread, other threads:[~2026-11-08  4:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-07 23:43 [PATCH v2] Input: amijoy - remove amijoy_phys Thorsten Blum
2026-11-08  4:26 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®