From: Dave Penkler Date: Fri, 18 Apr 2025 17:34:28 +0000 (+0200) Subject: staging: gpib: Fix setting controller-in-charge X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f56f2d6c9b6514866d489da6175a6cc9a95af02d;p=users%2Fdwmw2%2Flinux.git staging: gpib: Fix setting controller-in-charge The gpio board can only act as system controller. By the IEEE488.1 standard a system controller becomes controller-in-charge when it asserts the interface-clear control line. Remove the setting of controller-in-charge from bb_take_control and move it to bb_interface_clear. Fixes: 4cd654f84769 ("staging: gpib: Add gpio bitbang GPIB driver") Tested-by: Dave Penkler Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250418173434.2892-3-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/gpib/gpio/gpib_bitbang.c b/drivers/staging/gpib/gpio/gpib_bitbang.c index 29aab72c1f0fc..a92c4eda99a0b 100644 --- a/drivers/staging/gpib/gpio/gpib_bitbang.c +++ b/drivers/staging/gpib/gpio/gpib_bitbang.c @@ -872,7 +872,6 @@ static int bb_take_control(struct gpib_board *board, int synchronous) { dbg_printk(2, "%d\n", synchronous); set_atn(board, 1); - set_bit(CIC_NUM, &board->status); return 0; } @@ -908,6 +907,7 @@ static void bb_interface_clear(struct gpib_board *board, int assert) gpiod_direction_output(IFC, 0); priv->talker_state = talker_idle; priv->listener_state = listener_idle; + set_bit(CIC_NUM, &board->status); } else { gpiod_direction_output(IFC, 1); }