device: Const-ify all device driver instance pointers
Now that device_api attribute is unmodified at runtime, as well as all the other attributes, it is possible to switch all device driver instance to be constant. A coccinelle rule is used for this: @r_const_dev_1 disable optional_qualifier @ @@ -struct device * +const struct device * @r_const_dev_2 disable optional_qualifier @ @@ -struct device * const +const struct device * Fixes #27399 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
c8906fef79
commit
e18fcbba5a
1426 changed files with 9356 additions and 8368 deletions
|
@ -8,7 +8,8 @@
|
|||
#include <syscall_handler.h>
|
||||
|
||||
|
||||
static inline int z_vrfy_espi_config(struct device *dev, struct espi_cfg *cfg)
|
||||
static inline int z_vrfy_espi_config(const struct device *dev,
|
||||
struct espi_cfg *cfg)
|
||||
{
|
||||
struct espi_cfg cfg_copy;
|
||||
|
||||
|
@ -20,7 +21,7 @@ static inline int z_vrfy_espi_config(struct device *dev, struct espi_cfg *cfg)
|
|||
}
|
||||
#include <syscalls/espi_config_mrsh.c>
|
||||
|
||||
static inline bool z_vrfy_espi_get_channel_status(struct device *dev,
|
||||
static inline bool z_vrfy_espi_get_channel_status(const struct device *dev,
|
||||
enum espi_channel ch)
|
||||
{
|
||||
Z_OOPS(Z_SYSCALL_DRIVER_ESPI(dev, get_channel_status));
|
||||
|
@ -29,7 +30,7 @@ static inline bool z_vrfy_espi_get_channel_status(struct device *dev,
|
|||
}
|
||||
#include <syscalls/espi_get_channel_status_mrsh.c>
|
||||
|
||||
static inline int z_vrfy_espi_read_lpc_request(struct device *dev,
|
||||
static inline int z_vrfy_espi_read_lpc_request(const struct device *dev,
|
||||
enum lpc_peripheral_opcode op,
|
||||
uint32_t *data)
|
||||
{
|
||||
|
@ -45,7 +46,7 @@ static inline int z_vrfy_espi_read_lpc_request(struct device *dev,
|
|||
}
|
||||
#include <syscalls/espi_read_lpc_request_mrsh.c>
|
||||
|
||||
static inline int z_vrfy_espi_write_lpc_request(struct device *dev,
|
||||
static inline int z_vrfy_espi_write_lpc_request(const struct device *dev,
|
||||
enum lpc_peripheral_opcode op,
|
||||
uint32_t *data)
|
||||
{
|
||||
|
@ -58,7 +59,7 @@ static inline int z_vrfy_espi_write_lpc_request(struct device *dev,
|
|||
}
|
||||
#include <syscalls/espi_write_lpc_request_mrsh.c>
|
||||
|
||||
static inline int z_vrfy_espi_send_vwire(struct device *dev,
|
||||
static inline int z_vrfy_espi_send_vwire(const struct device *dev,
|
||||
enum espi_vwire_signal signal,
|
||||
uint8_t level)
|
||||
{
|
||||
|
@ -68,7 +69,7 @@ static inline int z_vrfy_espi_send_vwire(struct device *dev,
|
|||
}
|
||||
#include <syscalls/espi_send_vwire_mrsh.c>
|
||||
|
||||
static inline int z_vrfy_espi_receive_vwire(struct device *dev,
|
||||
static inline int z_vrfy_espi_receive_vwire(const struct device *dev,
|
||||
enum espi_vwire_signal signal,
|
||||
uint8_t *level)
|
||||
{
|
||||
|
@ -84,7 +85,7 @@ static inline int z_vrfy_espi_receive_vwire(struct device *dev,
|
|||
}
|
||||
#include <syscalls/espi_receive_vwire_mrsh.c>
|
||||
|
||||
static inline int z_vrfy_espi_read_request(struct device *dev,
|
||||
static inline int z_vrfy_espi_read_request(const struct device *dev,
|
||||
struct espi_request_packet *req)
|
||||
{
|
||||
int ret;
|
||||
|
@ -104,7 +105,7 @@ static inline int z_vrfy_espi_read_request(struct device *dev,
|
|||
}
|
||||
#include <syscalls/espi_read_request_mrsh.c>
|
||||
|
||||
static inline int z_vrfy_espi_write_request(struct device *dev,
|
||||
static inline int z_vrfy_espi_write_request(const struct device *dev,
|
||||
struct espi_request_packet *req)
|
||||
{
|
||||
int ret;
|
||||
|
@ -121,7 +122,7 @@ static inline int z_vrfy_espi_write_request(struct device *dev,
|
|||
}
|
||||
#include <syscalls/espi_write_request_mrsh.c>
|
||||
|
||||
static inline int z_vrfy_espi_send_oob(struct device *dev,
|
||||
static inline int z_vrfy_espi_send_oob(const struct device *dev,
|
||||
struct espi_oob_packet *pckt)
|
||||
{
|
||||
int ret;
|
||||
|
@ -138,7 +139,7 @@ static inline int z_vrfy_espi_send_oob(struct device *dev,
|
|||
}
|
||||
#include <syscalls/espi_send_oob_mrsh.c>
|
||||
|
||||
static inline int z_vrfy_espi_receive_oob(struct device *dev,
|
||||
static inline int z_vrfy_espi_receive_oob(const struct device *dev,
|
||||
struct espi_oob_packet *pckt)
|
||||
{
|
||||
int ret;
|
||||
|
@ -157,7 +158,7 @@ static inline int z_vrfy_espi_receive_oob(struct device *dev,
|
|||
}
|
||||
#include <syscalls/espi_receive_oob_mrsh.c>
|
||||
|
||||
static inline int z_vrfy_espi_read_flash(struct device *dev,
|
||||
static inline int z_vrfy_espi_read_flash(const struct device *dev,
|
||||
struct espi_flash_packet *pckt)
|
||||
{
|
||||
int ret;
|
||||
|
@ -176,7 +177,7 @@ static inline int z_vrfy_espi_read_flash(struct device *dev,
|
|||
}
|
||||
#include <syscalls/espi_read_flash_mrsh.c>
|
||||
|
||||
static inline int z_vrfy_espi_write_flash(struct device *dev,
|
||||
static inline int z_vrfy_espi_write_flash(const struct device *dev,
|
||||
struct espi_flash_packet *pckt)
|
||||
{
|
||||
int ret;
|
||||
|
@ -193,7 +194,7 @@ static inline int z_vrfy_espi_write_flash(struct device *dev,
|
|||
}
|
||||
#include <syscalls/espi_write_flash_mrsh.c>
|
||||
|
||||
static inline int z_vrfy_espi_flash_erase(struct device *dev,
|
||||
static inline int z_vrfy_espi_flash_erase(const struct device *dev,
|
||||
struct espi_flash_packet *pckt)
|
||||
{
|
||||
int ret;
|
||||
|
|
|
@ -55,7 +55,7 @@ LOG_MODULE_REGISTER(espi, CONFIG_ESPI_LOG_LEVEL);
|
|||
|
||||
struct espi_isr {
|
||||
uint32_t girq_bit;
|
||||
void (*the_isr)(struct device *dev);
|
||||
void (*the_isr)(const struct device *dev);
|
||||
};
|
||||
|
||||
struct espi_xec_config {
|
||||
|
@ -203,7 +203,7 @@ static uint32_t slave_rx_mem[MAX_OOB_BUFFER_SIZE];
|
|||
static uint32_t slave_tx_mem[MAX_OOB_BUFFER_SIZE];
|
||||
static uint32_t slave_mem[MAX_SLAVE_BUFFER_SIZE];
|
||||
|
||||
static int espi_xec_configure(struct device *dev, struct espi_cfg *cfg)
|
||||
static int espi_xec_configure(const struct device *dev, struct espi_cfg *cfg)
|
||||
{
|
||||
uint8_t iomode = 0;
|
||||
uint8_t cap0 = ESPI_CAP_REGS->GLB_CAP0;
|
||||
|
@ -294,7 +294,8 @@ static int espi_xec_configure(struct device *dev, struct espi_cfg *cfg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool espi_xec_channel_ready(struct device *dev, enum espi_channel ch)
|
||||
static bool espi_xec_channel_ready(const struct device *dev,
|
||||
enum espi_channel ch)
|
||||
{
|
||||
bool sts;
|
||||
|
||||
|
@ -319,7 +320,7 @@ static bool espi_xec_channel_ready(struct device *dev, enum espi_channel ch)
|
|||
return sts;
|
||||
}
|
||||
|
||||
static int espi_xec_read_lpc_request(struct device *dev,
|
||||
static int espi_xec_read_lpc_request(const struct device *dev,
|
||||
enum lpc_peripheral_opcode op,
|
||||
uint32_t *data)
|
||||
{
|
||||
|
@ -355,7 +356,7 @@ static int espi_xec_read_lpc_request(struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int espi_xec_write_lpc_request(struct device *dev,
|
||||
static int espi_xec_write_lpc_request(const struct device *dev,
|
||||
enum lpc_peripheral_opcode op,
|
||||
uint32_t *data)
|
||||
{
|
||||
|
@ -410,7 +411,7 @@ static int espi_xec_write_lpc_request(struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int espi_xec_send_vwire(struct device *dev,
|
||||
static int espi_xec_send_vwire(const struct device *dev,
|
||||
enum espi_vwire_signal signal, uint8_t level)
|
||||
{
|
||||
struct xec_signal signal_info = vw_tbl[signal];
|
||||
|
@ -448,7 +449,7 @@ static int espi_xec_send_vwire(struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int espi_xec_receive_vwire(struct device *dev,
|
||||
static int espi_xec_receive_vwire(const struct device *dev,
|
||||
enum espi_vwire_signal signal, uint8_t *level)
|
||||
{
|
||||
struct xec_signal signal_info = vw_tbl[signal];
|
||||
|
@ -473,7 +474,8 @@ static int espi_xec_receive_vwire(struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int espi_xec_send_oob(struct device *dev, struct espi_oob_packet *pckt)
|
||||
static int espi_xec_send_oob(const struct device *dev,
|
||||
struct espi_oob_packet *pckt)
|
||||
{
|
||||
int ret;
|
||||
struct espi_xec_data *data = (struct espi_xec_data *)(dev->data);
|
||||
|
@ -519,7 +521,7 @@ static int espi_xec_send_oob(struct device *dev, struct espi_oob_packet *pckt)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int espi_xec_receive_oob(struct device *dev,
|
||||
static int espi_xec_receive_oob(const struct device *dev,
|
||||
struct espi_oob_packet *pckt)
|
||||
{
|
||||
int ret;
|
||||
|
@ -555,7 +557,7 @@ static int espi_xec_receive_oob(struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int espi_xec_flash_read(struct device *dev,
|
||||
static int espi_xec_flash_read(const struct device *dev,
|
||||
struct espi_flash_packet *pckt)
|
||||
{
|
||||
int ret;
|
||||
|
@ -603,8 +605,8 @@ static int espi_xec_flash_read(struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int espi_xec_flash_write(struct device *dev,
|
||||
struct espi_flash_packet *pckt)
|
||||
static int espi_xec_flash_write(const struct device *dev,
|
||||
struct espi_flash_packet *pckt)
|
||||
{
|
||||
int ret;
|
||||
uint32_t err_mask = MCHP_ESPI_FC_STS_IBERR |
|
||||
|
@ -654,7 +656,7 @@ static int espi_xec_flash_write(struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int espi_xec_manage_callback(struct device *dev,
|
||||
static int espi_xec_manage_callback(const struct device *dev,
|
||||
struct espi_callback *callback, bool set)
|
||||
{
|
||||
struct espi_xec_data *data = (struct espi_xec_data *)(dev->data);
|
||||
|
@ -663,7 +665,7 @@ static int espi_xec_manage_callback(struct device *dev,
|
|||
}
|
||||
|
||||
#ifdef CONFIG_ESPI_AUTOMATIC_BOOT_DONE_ACKNOWLEDGE
|
||||
static void send_slave_bootdone(struct device *dev)
|
||||
static void send_slave_bootdone(const struct device *dev)
|
||||
{
|
||||
int ret;
|
||||
uint8_t boot_done;
|
||||
|
@ -679,7 +681,7 @@ static void send_slave_bootdone(struct device *dev)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPI_OOB_CHANNEL
|
||||
static void espi_init_oob(struct device *dev)
|
||||
static void espi_init_oob(const struct device *dev)
|
||||
{
|
||||
struct espi_xec_config *config =
|
||||
(struct espi_xec_config *) (dev->config);
|
||||
|
@ -701,7 +703,7 @@ static void espi_init_oob(struct device *dev)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPI_FLASH_CHANNEL
|
||||
static void espi_init_flash(struct device *dev)
|
||||
static void espi_init_flash(const struct device *dev)
|
||||
{
|
||||
struct espi_xec_config *config =
|
||||
(struct espi_xec_config *)(dev->config);
|
||||
|
@ -715,7 +717,7 @@ static void espi_init_flash(struct device *dev)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void espi_bus_init(struct device *dev)
|
||||
static void espi_bus_init(const struct device *dev)
|
||||
{
|
||||
const struct espi_xec_config *config = dev->config;
|
||||
|
||||
|
@ -724,7 +726,7 @@ static void espi_bus_init(struct device *dev)
|
|||
MCHP_ESPI_VW_EN_GIRQ_VAL | MCHP_ESPI_PC_GIRQ_VAL;
|
||||
}
|
||||
|
||||
static void espi_rst_isr(struct device *dev)
|
||||
static void espi_rst_isr(const struct device *dev)
|
||||
{
|
||||
uint8_t rst_sts;
|
||||
struct espi_xec_data *data = (struct espi_xec_data *)(dev->data);
|
||||
|
@ -758,7 +760,7 @@ static void espi_rst_isr(struct device *dev)
|
|||
* then make its BAR valid.
|
||||
* Refer to microchip eSPI I/O base addresses for default values
|
||||
*/
|
||||
static void config_sub_devices(struct device *dev)
|
||||
static void config_sub_devices(const struct device *dev)
|
||||
{
|
||||
#ifdef CONFIG_ESPI_PERIPHERAL_UART
|
||||
/* eSPI logical UART is tied to corresponding physical UART
|
||||
|
@ -832,7 +834,8 @@ static void configure_sirq(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void setup_espi_io_config(struct device *dev, uint16_t host_address)
|
||||
static void setup_espi_io_config(const struct device *dev,
|
||||
uint16_t host_address)
|
||||
{
|
||||
ESPI_EIO_BAR_REGS->EC_BAR_IOC = (host_address << 16) |
|
||||
MCHP_ESPI_IO_BAR_HOST_VALID;
|
||||
|
@ -846,7 +849,7 @@ static void setup_espi_io_config(struct device *dev, uint16_t host_address)
|
|||
ESPI_CAP_REGS->PC_RDY = 1;
|
||||
}
|
||||
|
||||
static void espi_pc_isr(struct device *dev)
|
||||
static void espi_pc_isr(const struct device *dev)
|
||||
{
|
||||
uint32_t status = ESPI_PC_REGS->PC_STATUS;
|
||||
|
||||
|
@ -859,7 +862,7 @@ static void espi_pc_isr(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void espi_vwire_chanel_isr(struct device *dev)
|
||||
static void espi_vwire_chanel_isr(const struct device *dev)
|
||||
{
|
||||
struct espi_xec_data *data = (struct espi_xec_data *)(dev->data);
|
||||
const struct espi_xec_config *config = dev->config;
|
||||
|
@ -884,7 +887,7 @@ static void espi_vwire_chanel_isr(struct device *dev)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_ESPI_OOB_CHANNEL
|
||||
static void espi_oob_down_isr(struct device *dev)
|
||||
static void espi_oob_down_isr(const struct device *dev)
|
||||
{
|
||||
uint32_t status;
|
||||
struct espi_xec_data *data = (struct espi_xec_data *)(dev->data);
|
||||
|
@ -903,7 +906,7 @@ static void espi_oob_down_isr(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void espi_oob_up_isr(struct device *dev)
|
||||
static void espi_oob_up_isr(const struct device *dev)
|
||||
{
|
||||
uint32_t status;
|
||||
struct espi_xec_data *data = (struct espi_xec_data *)(dev->data);
|
||||
|
@ -936,7 +939,7 @@ static void espi_oob_up_isr(struct device *dev)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPI_FLASH_CHANNEL
|
||||
static void espi_flash_isr(struct device *dev)
|
||||
static void espi_flash_isr(const struct device *dev)
|
||||
{
|
||||
uint32_t status;
|
||||
struct espi_xec_data *data = (struct espi_xec_data *)(dev->data);
|
||||
|
@ -971,7 +974,7 @@ static void espi_flash_isr(struct device *dev)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void vw_pltrst_isr(struct device *dev)
|
||||
static void vw_pltrst_isr(const struct device *dev)
|
||||
{
|
||||
struct espi_xec_data *data = (struct espi_xec_data *)(dev->data);
|
||||
struct espi_event evt = { ESPI_BUS_EVENT_VWIRE_RECEIVED,
|
||||
|
@ -993,7 +996,7 @@ static void vw_pltrst_isr(struct device *dev)
|
|||
}
|
||||
|
||||
/* Send callbacks if enabled and track eSPI host system state */
|
||||
static void notify_system_state(struct device *dev,
|
||||
static void notify_system_state(const struct device *dev,
|
||||
enum espi_vwire_signal signal)
|
||||
{
|
||||
struct espi_xec_data *data = (struct espi_xec_data *)(dev->data);
|
||||
|
@ -1010,7 +1013,7 @@ static void notify_system_state(struct device *dev,
|
|||
espi_send_callbacks(&data->callbacks, dev, evt);
|
||||
}
|
||||
|
||||
static void notify_host_warning(struct device *dev,
|
||||
static void notify_host_warning(const struct device *dev,
|
||||
enum espi_vwire_signal signal)
|
||||
{
|
||||
uint8_t status;
|
||||
|
@ -1047,42 +1050,42 @@ static void notify_host_warning(struct device *dev,
|
|||
}
|
||||
}
|
||||
|
||||
static void vw_slp3_isr(struct device *dev)
|
||||
static void vw_slp3_isr(const struct device *dev)
|
||||
{
|
||||
notify_system_state(dev, ESPI_VWIRE_SIGNAL_SLP_S3);
|
||||
}
|
||||
|
||||
static void vw_slp4_isr(struct device *dev)
|
||||
static void vw_slp4_isr(const struct device *dev)
|
||||
{
|
||||
notify_system_state(dev, ESPI_VWIRE_SIGNAL_SLP_S4);
|
||||
}
|
||||
|
||||
static void vw_slp5_isr(struct device *dev)
|
||||
static void vw_slp5_isr(const struct device *dev)
|
||||
{
|
||||
notify_system_state(dev, ESPI_VWIRE_SIGNAL_SLP_S5);
|
||||
}
|
||||
|
||||
static void vw_host_rst_warn_isr(struct device *dev)
|
||||
static void vw_host_rst_warn_isr(const struct device *dev)
|
||||
{
|
||||
notify_host_warning(dev, ESPI_VWIRE_SIGNAL_HOST_RST_WARN);
|
||||
}
|
||||
|
||||
static void vw_sus_warn_isr(struct device *dev)
|
||||
static void vw_sus_warn_isr(const struct device *dev)
|
||||
{
|
||||
notify_host_warning(dev, ESPI_VWIRE_SIGNAL_SUS_WARN);
|
||||
}
|
||||
|
||||
static void vw_oob_rst_isr(struct device *dev)
|
||||
static void vw_oob_rst_isr(const struct device *dev)
|
||||
{
|
||||
notify_host_warning(dev, ESPI_VWIRE_SIGNAL_OOB_RST_WARN);
|
||||
}
|
||||
|
||||
static void vw_sus_slp_a_isr(struct device *dev)
|
||||
static void vw_sus_slp_a_isr(const struct device *dev)
|
||||
{
|
||||
notify_system_state(dev, ESPI_VWIRE_SIGNAL_SLP_A);
|
||||
}
|
||||
|
||||
static void ibf_isr(struct device *dev)
|
||||
static void ibf_isr(const struct device *dev)
|
||||
{
|
||||
struct espi_xec_data *data = (struct espi_xec_data *)(dev->data);
|
||||
struct espi_event evt = { ESPI_BUS_PERIPHERAL_NOTIFICATION,
|
||||
|
@ -1093,7 +1096,7 @@ static void ibf_isr(struct device *dev)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_ESPI_PERIPHERAL_HOST_IO_PVT
|
||||
static void ibf_pvt_isr(struct device *dev)
|
||||
static void ibf_pvt_isr(const struct device *dev)
|
||||
{
|
||||
struct espi_xec_data *data = (struct espi_xec_data *)(dev->data);
|
||||
struct espi_event evt = {
|
||||
|
@ -1106,7 +1109,7 @@ static void ibf_pvt_isr(struct device *dev)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void ibf_kbc_isr(struct device *dev)
|
||||
static void ibf_kbc_isr(const struct device *dev)
|
||||
{
|
||||
struct espi_xec_data *data = (struct espi_xec_data *)(dev->data);
|
||||
|
||||
|
@ -1127,7 +1130,7 @@ static void ibf_kbc_isr(struct device *dev)
|
|||
espi_send_callbacks(&data->callbacks, dev, evt);
|
||||
}
|
||||
|
||||
static void port80_isr(struct device *dev)
|
||||
static void port80_isr(const struct device *dev)
|
||||
{
|
||||
struct espi_xec_data *data = (struct espi_xec_data *)(dev->data);
|
||||
struct espi_event evt = { ESPI_BUS_PERIPHERAL_NOTIFICATION,
|
||||
|
@ -1139,7 +1142,7 @@ static void port80_isr(struct device *dev)
|
|||
espi_send_callbacks(&data->callbacks, dev, evt);
|
||||
}
|
||||
|
||||
static void port81_isr(struct device *dev)
|
||||
static void port81_isr(const struct device *dev)
|
||||
{
|
||||
struct espi_xec_data *data = (struct espi_xec_data *)(dev->data);
|
||||
struct espi_event evt = { ESPI_BUS_PERIPHERAL_NOTIFICATION,
|
||||
|
@ -1203,7 +1206,7 @@ static uint8_t periph_isr_cnt = sizeof(peripherals_isr) / sizeof(struct espi_isr
|
|||
|
||||
static void espi_xec_bus_isr(void *arg)
|
||||
{
|
||||
struct device *dev = (struct device *)arg;
|
||||
const struct device *dev = (const struct device *)arg;
|
||||
const struct espi_xec_config *config = dev->config;
|
||||
uint32_t girq_result;
|
||||
|
||||
|
@ -1224,7 +1227,7 @@ static void espi_xec_bus_isr(void *arg)
|
|||
|
||||
static void espi_xec_vw_isr(void *arg)
|
||||
{
|
||||
struct device *dev = (struct device *)arg;
|
||||
const struct device *dev = (const struct device *)arg;
|
||||
const struct espi_xec_config *config = dev->config;
|
||||
uint32_t girq_result;
|
||||
|
||||
|
@ -1245,7 +1248,7 @@ static void espi_xec_vw_isr(void *arg)
|
|||
|
||||
static void espi_xec_periph_isr(void *arg)
|
||||
{
|
||||
struct device *dev = (struct device *)arg;
|
||||
const struct device *dev = (const struct device *)arg;
|
||||
const struct espi_xec_config *config = dev->config;
|
||||
uint32_t girq_result;
|
||||
|
||||
|
@ -1264,7 +1267,7 @@ static void espi_xec_periph_isr(void *arg)
|
|||
REG32(MCHP_GIRQ_SRC_ADDR(config->pc_girq_id)) = girq_result;
|
||||
}
|
||||
|
||||
static int espi_xec_init(struct device *dev);
|
||||
static int espi_xec_init(const struct device *dev);
|
||||
|
||||
static const struct espi_driver_api espi_xec_driver_api = {
|
||||
.config = espi_xec_configure,
|
||||
|
@ -1294,7 +1297,7 @@ DEVICE_AND_API_INIT(espi_xec_0, DT_INST_LABEL(0),
|
|||
PRE_KERNEL_2, CONFIG_ESPI_INIT_PRIORITY,
|
||||
&espi_xec_driver_api);
|
||||
|
||||
static int espi_xec_init(struct device *dev)
|
||||
static int espi_xec_init(const struct device *dev)
|
||||
{
|
||||
const struct espi_xec_config *config = dev->config;
|
||||
struct espi_xec_data *data = (struct espi_xec_data *)(dev->data);
|
||||
|
|
|
@ -49,7 +49,7 @@ static int espi_manage_callback(sys_slist_t *callbacks,
|
|||
* @param pins The details on the event that triggered the callback.
|
||||
*/
|
||||
static inline void espi_send_callbacks(sys_slist_t *list,
|
||||
struct device *device,
|
||||
const struct device *device,
|
||||
struct espi_event evt)
|
||||
{
|
||||
struct espi_callback *cb, *tmp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue