can: mcp251xfd: mcp251xfd_start_xmit(): use mcp251xfd_get_tx_free() to check TX is...
authorMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 20 Dec 2020 13:02:29 +0000 (14:02 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 27 Jan 2021 09:01:46 +0000 (10:01 +0100)
commit9845b8f530196fd86fcc46c1c1298bf94b1604bf
treeb9fa2fb5597961befb57eb8b94fcff1664bb4246
parentcdc4c698e4be256634e722494dac0fa40e4137e2
can: mcp251xfd: mcp251xfd_start_xmit(): use mcp251xfd_get_tx_free() to check TX is is full

This patch replaces an open coded check if the TX ring is full by a check if
mcp251xfd_get_tx_free() returns 0.

Link: https://lore.kernel.org/r/20210114153448.1506901-2-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c