All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thorsten Blum <blum@kernel.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Thorsten Blum <blum@kernel.org>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2] Input: amijoy - remove amijoy_phys
Date: Sun,  8 Nov 2026 00:43:47 +0100	[thread overview]
Message-ID: <20261107234349.382944-3-blum@kernel.org> (raw)

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;

             reply	other threads:[~2026-11-07 23:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-07 23:43 Thorsten Blum [this message]
2026-11-08  4:26 ` [PATCH v2] Input: amijoy - remove amijoy_phys Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261107234349.382944-3-blum@kernel.org \
    --to=blum@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.