drivers: Convert FOR_EACH macro instances to use CONTAINER

Change-Id: Ifc08d39fe84f522e071d3b9e32479798bbd89c6c
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2017-02-08 16:51:31 +02:00 committed by Anas Nashif
parent a8ed185615
commit 2e444cb34c

View file

@ -45,11 +45,8 @@ static inline void _gpio_fire_callbacks(sys_slist_t *list,
uint32_t pins)
{
struct gpio_callback *cb;
sys_snode_t *node;
SYS_SLIST_FOR_EACH_NODE(list, node) {
cb = (struct gpio_callback *)node;
SYS_SLIST_FOR_EACH_CONTAINER(list, cb, node) {
if (cb->pin_mask & pins) {
__ASSERT(cb->handler, "No callback handler!");
cb->handler(port, cb, pins);