往MA35D1内核5.10.140版本打入RT_PREEMPT实时补丁编译内核报错,出现下面错误:
drivers/spi/spi-ma35d1-qspi.c: In function ‘nuvoton_spi_probe’:
./include/linux/spinlock_types_rt.h:32:2: error: expected expression before ‘{’ token
32 | { .lock = __RT_SPIN_INITIALIZER(name.lock), \
| ^
drivers/spi/spi-ma35d1-qspi.c:973:42: note: in expansion of macro ‘__SPIN_LOCK_UNLOCKED’
973 | nuvoton->slave_txdone.lock = __SPIN_LOCK_UNLOCKED(nuvoton->slave_txdone.lock);
| ^~~~~~~~~~~~~~~~~~~~
./include/linux/spinlock_types_rt.h:32:2: error: expected expression before ‘{’ token
32 | { .lock = __RT_SPIN_INITIALIZER(name.lock), \
| ^
drivers/spi/spi-ma35d1-qspi.c:977:42: note: in expansion of macro ‘__SPIN_LOCK_UNLOCKED’
977 | nuvoton->slave_rxdone.lock = __SPIN_LOCK_UNLOCKED(nuvoton->slave_rxdone.lock); |