Commit 6fe27d68 authored by Vincent Mailhol's avatar Vincent Mailhol Committed by Marc Kleine-Budde

can: dev: export can_get_state_str() function

The can_get_state_str() function is also relevant to the drivers. Export the
symbol and make it visible in the can/dev.h header.

Link: https://lore.kernel.org/r/20210119170355.12040-1-mailhol.vincent@wanadoo.frSigned-off-by: default avatarVincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 02ee6808
...@@ -74,7 +74,7 @@ static int can_rx_state_to_frame(struct net_device *dev, enum can_state state) ...@@ -74,7 +74,7 @@ static int can_rx_state_to_frame(struct net_device *dev, enum can_state state)
} }
} }
static const char *can_get_state_str(const enum can_state state) const char *can_get_state_str(const enum can_state state)
{ {
switch (state) { switch (state) {
case CAN_STATE_ERROR_ACTIVE: case CAN_STATE_ERROR_ACTIVE:
...@@ -95,6 +95,7 @@ static const char *can_get_state_str(const enum can_state state) ...@@ -95,6 +95,7 @@ static const char *can_get_state_str(const enum can_state state)
return "<unknown>"; return "<unknown>";
} }
EXPORT_SYMBOL_GPL(can_get_state_str);
void can_change_state(struct net_device *dev, struct can_frame *cf, void can_change_state(struct net_device *dev, struct can_frame *cf,
enum can_state tx_state, enum can_state rx_state) enum can_state tx_state, enum can_state rx_state)
......
...@@ -123,6 +123,7 @@ void unregister_candev(struct net_device *dev); ...@@ -123,6 +123,7 @@ void unregister_candev(struct net_device *dev);
int can_restart_now(struct net_device *dev); int can_restart_now(struct net_device *dev);
void can_bus_off(struct net_device *dev); void can_bus_off(struct net_device *dev);
const char *can_get_state_str(const enum can_state state);
void can_change_state(struct net_device *dev, struct can_frame *cf, void can_change_state(struct net_device *dev, struct can_frame *cf,
enum can_state tx_state, enum can_state rx_state); enum can_state tx_state, enum can_state rx_state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment