Skip to content

Commit 2eab123

Browse files
dpenklergregkh
authored andcommitted
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: 4cd654f ("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>
1 parent f56f2d6 commit 2eab123

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/staging/gpib/gpio/gpib_bitbang.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,8 @@ static int bb_go_to_standby(struct gpib_board *board)
884884

885885
static int bb_request_system_control(struct gpib_board *board, int request_control)
886886
{
887+
struct bb_priv *priv = board->private_data;
888+
887889
dbg_printk(2, "%d\n", request_control);
888890
if (!request_control)
889891
return -EINVAL;
@@ -895,6 +897,8 @@ static int bb_request_system_control(struct gpib_board *board, int request_contr
895897

896898
gpiod_direction_input(SRQ);
897899

900+
ENABLE_IRQ(priv->irq_SRQ, IRQ_TYPE_EDGE_FALLING);
901+
898902
return 0;
899903
}
900904

@@ -1299,8 +1303,6 @@ static int bb_attach(struct gpib_board *board, const struct gpib_board_config *c
12991303
IRQF_TRIGGER_NONE))
13001304
goto bb_attach_fail_r;
13011305

1302-
ENABLE_IRQ(priv->irq_SRQ, IRQ_TYPE_EDGE_FALLING);
1303-
13041306
dbg_printk(0, "attached board %d\n", board->minor);
13051307
goto bb_attach_out;
13061308

0 commit comments

Comments
 (0)