can: mcp251xfd: mcp251xfd_get_timestamp(): move to mcp251xfd.h
authorMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 3 Mar 2021 10:43:41 +0000 (11:43 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 30 Mar 2021 09:14:50 +0000 (11:14 +0200)
This is a preparation patch, it moves the mcp251xfd_get_timestamp()
function into the mcp251xfd.h file.

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

index e2e5b5c7f736102a27422c5b629ab0f7fca191de..41e322954d9aecf400f1d3fe7d88eefc301c3537 100644 (file)
@@ -1597,12 +1597,6 @@ static int mcp251xfd_handle_rxif(struct mcp251xfd_priv *priv)
        return 0;
 }
 
-static inline int mcp251xfd_get_timestamp(const struct mcp251xfd_priv *priv,
-                                         u32 *timestamp)
-{
-       return regmap_read(priv->map_reg, MCP251XFD_REG_TBC, timestamp);
-}
-
 static struct sk_buff *
 mcp251xfd_alloc_can_err_skb(const struct mcp251xfd_priv *priv,
                            struct can_frame **cf, u32 *timestamp)
index d0a0d2f91dacc4dff45946ab3b11cd296f32c9b3..074c5adf9b94ecb7bc90e53d9768e0e79f03b463 100644 (file)
@@ -728,6 +728,12 @@ mcp251xfd_spi_cmd_write(const struct mcp251xfd_priv *priv,
        return data;
 }
 
+static inline int mcp251xfd_get_timestamp(const struct mcp251xfd_priv *priv,
+                                         u32 *timestamp)
+{
+       return regmap_read(priv->map_reg, MCP251XFD_REG_TBC, timestamp);
+}
+
 static inline u16 mcp251xfd_get_tef_obj_addr(u8 n)
 {
        return MCP251XFD_RAM_START +