Skip to content

serial: core: Do not hold the port lock when setting the term GPIO

Ghost User requested to merge fix/REVPI-3278/fix_term_gpio_setting into revpi-6.1

Created by: linosanfilippo-kunbus

Both callers of uart_rs485_config() call the function with the port lock held. uart_rs485_config() however may sleep so in both cases the call results in a warning splat.

Fix this by moving the sleepable part (i.e. the call to uart_set_rs485_termination()) out of uart_rs485_config() into the callers before the lock is taken.

Fixes: 7c7f9bc9 ("serial: Deassert Transmit Enable on probe in driver-specific way")

Merge request reports