summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Penkler <dpenkler@gmail.com>2025-04-18 20:34:29 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-25 17:08:26 +0300
commit2eab123b6e643c0a11d9bc31f8a63078bf38734d (patch)
treeed67660809cacc14a0fe01a4c07d840c8621efe8
parentf56f2d6c9b6514866d489da6175a6cc9a95af02d (diff)
downloadlinux-2eab123b6e643c0a11d9bc31f8a63078bf38734d.tar.xz
staging: gpib: Enable SRQ irq on request_system_control
The SRQ irq was being enabled on attach but the board is not set up to handle it until it becomes system controller. Move the enabling of the SRQ irq to bb_request_system_control. Fixes: 4cd654f84769 ("staging: gpib: Add gpio bitbang GPIB driver") Tested-by: Dave Penkler <dpenkler@gmail.com> Signed-off-by: Dave Penkler <dpenkler@gmail.com> Link: https://lore.kernel.org/r/20250418173434.2892-4-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/gpib/gpio/gpib_bitbang.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/gpib/gpio/gpib_bitbang.c b/drivers/staging/gpib/gpio/gpib_bitbang.c
index a92c4eda99a0..ac9ecb6e0aad 100644
--- a/drivers/staging/gpib/gpio/gpib_bitbang.c
+++ b/drivers/staging/gpib/gpio/gpib_bitbang.c
@@ -884,6 +884,8 @@ static int bb_go_to_standby(struct gpib_board *board)
static int bb_request_system_control(struct gpib_board *board, int request_control)
{
+ struct bb_priv *priv = board->private_data;
+
dbg_printk(2, "%d\n", request_control);
if (!request_control)
return -EINVAL;
@@ -895,6 +897,8 @@ static int bb_request_system_control(struct gpib_board *board, int request_contr
gpiod_direction_input(SRQ);
+ ENABLE_IRQ(priv->irq_SRQ, IRQ_TYPE_EDGE_FALLING);
+
return 0;
}
@@ -1299,8 +1303,6 @@ static int bb_attach(struct gpib_board *board, const struct gpib_board_config *c
IRQF_TRIGGER_NONE))
goto bb_attach_fail_r;
- ENABLE_IRQ(priv->irq_SRQ, IRQ_TYPE_EDGE_FALLING);
-
dbg_printk(0, "attached board %d\n", board->minor);
goto bb_attach_out;