diff --git a/drivers/ioexpander/gpio.c b/drivers/ioexpander/gpio.c index ef27ae640a..56ba35130e 100644 --- a/drivers/ioexpander/gpio.c +++ b/drivers/ioexpander/gpio.c @@ -330,7 +330,7 @@ static int gpio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) (FAR enum gpio_pintype_e *)((uintptr_t)arg); DEBUGASSERT(ptr != NULL); - *ptr = dev->gp_pintype; + *ptr = (FAR enum gpio_pintype_e)dev->gp_pintype; ret = OK; } break;