drivers: Manual const-ification of device driver instance

These are all the case that coccinelle cannot find as they are inside
macro declarations.

Fixed via:

git grep -rlz -E "\(struct device \*" |
	xargs -0 sed -i 's/(struct device/(const struct device/g'

Fixes #27399

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2020-07-14 17:02:00 +02:00 committed by Carles Cufí
commit ef560e0a53
62 changed files with 142 additions and 143 deletions

View file

@ -470,13 +470,13 @@ static const struct uart_driver_api uart_esp32_api = {
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
#define ESP32_UART_IRQ_HANDLER_DECL(idx) \
static void uart_esp32_irq_config_func_##idx(struct device *dev)
static void uart_esp32_irq_config_func_##idx(const struct device *dev)
#define ESP32_UART_IRQ_HANDLER_FUNC(idx) \
.irq_config_func = uart_esp32_irq_config_func_##idx,
#define ESP32_UART_IRQ_HANDLER(idx) \
static void uart_esp32_irq_config_func_##idx(const struct device *dev) \
static void uart_esp32_irq_config_func_##idx(const struct device *dev) \
{ \
esp32_rom_intr_matrix_set(0, ETS_UART##idx##_INTR_SOURCE, \
INST_##idx##_ESPRESSIF_ESP32_UART_IRQ_0); \