mgmt: ec_host_cmd: fix struct init order

Order structure members according to the structure definition.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
This commit is contained in:
Dawid Niedzwiecki 2023-09-20 12:51:53 +02:00 committed by Carles Cufí
commit 340ffe1c48
2 changed files with 4 additions and 4 deletions

View file

@ -170,8 +170,8 @@ struct ec_host_cmd_handler {
*/
#define EC_HOST_CMD_HANDLER(_id, _function, _version_mask, _request_type, _response_type) \
const STRUCT_SECTION_ITERABLE(ec_host_cmd_handler, __cmd##_id) = { \
.id = _id, \
.handler = _function, \
.id = _id, \
.version_mask = _version_mask, \
.min_rqt_size = sizeof(_request_type), \
.min_rsp_size = sizeof(_response_type), \
@ -190,8 +190,8 @@ struct ec_host_cmd_handler {
*/
#define EC_HOST_CMD_HANDLER_UNBOUND(_id, _function, _version_mask) \
const STRUCT_SECTION_ITERABLE(ec_host_cmd_handler, __cmd##_id) = { \
.id = _id, \
.handler = _function, \
.id = _id, \
.version_mask = _version_mask, \
.min_rqt_size = 0, \
.min_rsp_size = 0, \

View file

@ -136,8 +136,8 @@ struct dma_stream {
struct ec_host_cmd_spi_cfg {
SPI_TypeDef *spi;
const struct pinctrl_dev_config *pcfg;
size_t pclk_len;
const struct stm32_pclken *pclken;
size_t pclk_len;
};
struct ec_host_cmd_spi_ctx {
@ -189,9 +189,9 @@ static int prepare_rx(struct ec_host_cmd_spi_ctx *hc_spi);
\
static struct ec_host_cmd_spi_cfg ec_host_cmd_spi_cfg = { \
.spi = (SPI_TypeDef *)DT_REG_ADDR(id), \
.pcfg = PINCTRL_DT_DEV_CONFIG_GET(id), \
.pclken = pclken, \
.pclk_len = DT_NUM_CLOCKS(id), \
.pcfg = PINCTRL_DT_DEV_CONFIG_GET(id), \
}; \
\
static struct dma_stream dma_rx = {SPI_DMA_CHANNEL_INIT(id, rx, RX, PERIPHERAL, MEMORY)}; \