diff --git a/drivers/can/mcp2515.c b/drivers/can/mcp2515.c index 50d4999e60..4a325a0426 100644 --- a/drivers/can/mcp2515.c +++ b/drivers/can/mcp2515.c @@ -2543,7 +2543,7 @@ FAR struct mcp2515_can_s *mcp2515_instantiate(FAR struct mcp2515_config_s *confi /* Return our private data structure as an opaque handle */ - return (MCP2515_HANDLE)priv; + return priv; } /**************************************************************************** diff --git a/include/nuttx/can/mcp2515.h b/include/nuttx/can/mcp2515.h index f7618fd88e..5689f76f1f 100644 --- a/include/nuttx/can/mcp2515.h +++ b/include/nuttx/can/mcp2515.h @@ -61,6 +61,9 @@ * Public Types ****************************************************************************/ +/* Type of the MCP2515 interrupt handling callback */ + +struct mcp2515_config_s; /* Forward reference */ typedef void (*mcp2515_handler_t)(FAR struct mcp2515_config_s *config, FAR void *arg); @@ -104,8 +107,7 @@ struct mcp2515_config_s mcp2515_handler_t handler, FAR void *arg); }; - -typedef FAR void *MCP2515_HANDLE; +/* Internal representation of the MCP2515 state data */ struct mcp2515_can_s;