irq: Change dynamic API to take a constant parameter

All ISRs are meant to take a const struct device pointer, but to
simplify the change let's just move the parameter to constant and that
should be fine.

Fixes #27399

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

View file

@ -28,8 +28,8 @@ extern "C" {
* on ARM Cortex-M (Thumb2).
*/
struct _isr_table_entry {
void *arg;
void (*isr)(void *);
const void *arg;
void (*isr)(const void *);
};
/* The software ISR table itself, an array of these structures indexed by the
@ -52,7 +52,7 @@ struct _isr_list {
/** ISR to call */
void *func;
/** Parameter for non-direct IRQs */
void *param;
const void *param;
};
/** This interrupt gets put directly in the vector table */
@ -68,12 +68,13 @@ struct _isr_list {
#define Z_ISR_DECLARE(irq, flags, func, param) \
static Z_DECL_ALIGN(struct _isr_list) Z_GENERIC_SECTION(.intList) \
__used _MK_ISR_NAME(func, __COUNTER__) = \
{irq, flags, (void *)&func, (void *)param}
{irq, flags, (void *)&func, (const void *)param}
#define IRQ_TABLE_SIZE (CONFIG_NUM_IRQS - CONFIG_GEN_IRQ_START_VECTOR)
#ifdef CONFIG_DYNAMIC_INTERRUPTS
void z_isr_install(unsigned int irq, void (*routine)(void *), void *param);
void z_isr_install(unsigned int irq, void (*routine)(const void *),
const void *param);
#endif
#ifdef __cplusplus