stm32_gpiosetevent: GPIO IRQ logic no longer returns the xcpt_t oldhandler. This value is useless and dangerous after the recent changes to interrupt argument passing.

This commit is contained in:
Gregory Nutt
2017-03-02 16:34:37 -06:00
parent 4f5e0e3519
commit f4bad1a280
34 changed files with 179 additions and 330 deletions
+5 -5
View File
@@ -41,6 +41,7 @@
#include <nuttx/config.h>
#include <stdint.h>
#include <errno.h>
#include <nuttx/arch.h>
#include <nuttx/board.h>
@@ -159,18 +160,17 @@ uint8_t board_buttons(void)
#ifdef CONFIG_ARCH_IRQBUTTONS
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
{
xcpt_t oldhandler = NULL;
int ret = -EINVAL;
/* The following should be atomic */
if (id >= MIN_IRQBUTTON && id <= MAX_IRQBUTTON)
{
oldhandler = stm32_gpiosetevent(g_buttons[id], true, true, true,
irqhandler, arg);
ret = stm32_gpiosetevent(g_buttons[id], true, true, true, irqhandler,
arg);
}
UNUSED(oldhandler);
return OK;
return ret;
}
#endif
#endif /* CONFIG_ARCH_BUTTONS */