[PATCH v2] Input: amijoy - remove amijoy_phys

From: Thorsten Blum

Date: Sat Nov 07 2026 - 18:44:51 EST


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@xxxxxxxxxx>
---
Changes in v2:
- Remove amijoy_phys as suggested by Dmitry
- v1: https://lore.kernel.org/r/20261107174739.369375-2-blum@xxxxxxxxxx/

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;