Skip to content

Commit 7327036

Browse files
tnmyshcarlescufi
authored andcommitted
drivers: ipm: xlnx: remove redundant code
Remove redundant function during child node initialization. Move log related header file near log related macro. Signed-off-by: Tanmay Shah <[email protected]>
1 parent 2d98887 commit 7327036

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

drivers/ipm/ipm_xlnx_ipi.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66

77
#define DT_DRV_COMPAT xlnx_zynqmp_ipi_mailbox
88

9+
#include "ipm_xlnx_ipi.h"
10+
911
#include <errno.h>
1012
#include <zephyr/device.h>
1113
#include <zephyr/drivers/ipm.h>
1214
#include <zephyr/irq.h>
13-
#include <zephyr/logging/log.h>
1415

15-
#include "ipm_xlnx_ipi.h"
16+
#include <zephyr/logging/log.h>
1617
LOG_MODULE_REGISTER(ipm_xlnx_ipi, CONFIG_IPM_LOG_LEVEL);
1718

1819
#define XLNX_IPI_MAX_BUF_SIZE_BYTES 32
@@ -110,15 +111,6 @@ static void xlnx_mailbox_rx_isr(const struct device *dev)
110111
}
111112
}
112113

113-
static int xlnx_ipi_child_init(const struct device *dev)
114-
{
115-
const struct xlnx_ipi_child_config *cdev_conf;
116-
117-
cdev_conf = dev->config;
118-
119-
return 0;
120-
}
121-
122114
static int xlnx_ipi_send(const struct device *ipmdev, int wait, uint32_t id, const void *data,
123115
int size)
124116
{
@@ -231,7 +223,7 @@ static struct ipm_driver_api xlnx_ipi_api = {
231223
xlnx_ipi_reg_info_zynqmp[DT_PROP(ch_node, remote_ipi_id)].ipi_ch_bit, \
232224
.host_ipi_reg = DT_REG_ADDR_BY_NAME(DT_PARENT(ch_node), host_ipi_reg), \
233225
}; \
234-
DEVICE_DT_DEFINE(ch_node, &xlnx_ipi_child_init, NULL, &xlnx_ipi_child_data##ch_node, \
226+
DEVICE_DT_DEFINE(ch_node, NULL, NULL, &xlnx_ipi_child_data##ch_node, \
235227
&xlnx_ipi_child_config##ch_node, POST_KERNEL, \
236228
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &xlnx_ipi_api);
237229

0 commit comments

Comments
 (0)