Skip to contentSkip to conversation

Input: amijoy - remove amijoy_phys

PATCH Applied Thorsten Blum 2 participants 2 messages Nov 7 – Nov 8

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Input: amijoy - remove amijoy_phys

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

---
Changes in v2:
- Remove amijoy_phys as suggested by Dmitry
- v1: https://lore.kernel.org/r/[email protected]/

 drivers/input/joystick/amijoy.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/input/joystick/amijoy.c +1 -2
index 3752dc2a2086..cfe407b56c41 100644
@@ -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;
maintainer Applied
#1 lore raw
Quoted 4 lines · Thorsten Blum

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

Applied, thank you.

Signature · 1 line
Dmitry