Skip to content

Commit c14afba

Browse files
geertugregkh
authored andcommitted
serial: rsci: Convert to FIELD_MODIFY()
Use the FIELD_MODIFY() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/ada3faf4698155a618ae6371b35eab121eb8b19c.1766411924.git.geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b5024e8 commit c14afba

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/tty/serial/rsci.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,7 @@ static int rsci_scif_set_rtrg(struct uart_port *port, int rx_trig)
207207
else if (rx_trig < 1)
208208
rx_trig = 0;
209209

210-
fcr &= ~FCR_RTRG4_0;
211-
fcr |= field_prep(FCR_RTRG4_0, rx_trig);
210+
FIELD_MODIFY(FCR_RTRG4_0, &fcr, rx_trig);
212211
rsci_serial_out(port, FCR, fcr);
213212

214213
return rx_trig;

0 commit comments

Comments
 (0)