can: m_can: Count read getindex in the driver
authorMarkus Schneider-Pargmann <msp@baylibre.com>
Tue, 6 Dec 2022 11:57:22 +0000 (12:57 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 12 Dec 2022 10:58:32 +0000 (11:58 +0100)
commit6355a3c983e6d6fc998f4223bd2c7ef047e4572b
tree9f389fa6353a786617425153968abb20e93a0a6b
parentd4535b90a76af49d1dd7bc70ad0311a88ac5313d
can: m_can: Count read getindex in the driver

The getindex gets increased by one every time. We can calculate the
correct getindex in the driver and avoid the additional reads of rxfs.

Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://lore.kernel.org/all/20221206115728.1056014-6-msp@baylibre.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/m_can/m_can.c