board_button_irq: Button IRQ logic no longer returns the xcpt_t oldhandler. There value is useless and dangerous after the recent changes to interrupt argument passing.

This commit is contained in:
Gregory Nutt
2017-03-02 14:37:22 -06:00
parent 4a4636c8a1
commit 4c82827ab1
65 changed files with 335 additions and 488 deletions
+6 -7
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* configs/cloudctrl/src/stm32_buttons.c
*
* Copyright (C) 2012, 2014-2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2014-2015, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
* Darcy Gong <darcy.gong@gmail.com>
*
@@ -151,15 +151,13 @@ uint8_t board_buttons(void)
* board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See
* the
* BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of
* enumeration value. The previous interrupt handler address is returned
* (so that it may restored, if so desired).
* the BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of
* enumeration value.
*
****************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
{
xcpt_t oldhandler = NULL;
@@ -171,7 +169,8 @@ xcpt_t board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
irqhandler, arg);
}
return oldhandler;
UNUSED(oldhandler);
return OK;
}
#endif
#endif /* CONFIG_ARCH_BUTTONS */