drivers: gpio: fix syscall handlers

No driver object checks were being performed for 3 APIs.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2020-03-05 18:09:10 -08:00 committed by Johan Hedberg
commit d6d42bef97

View file

@ -71,6 +71,8 @@ static inline int z_vrfy_gpio_pin_interrupt_configure(struct device *port,
static inline int z_vrfy_gpio_enable_callback(struct device *port,
gpio_pin_t pin)
{
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, enable_callback));
return z_impl_gpio_enable_callback((struct device *)port, pin);
}
#include <syscalls/gpio_enable_callback_mrsh.c>
@ -78,12 +80,16 @@ static inline int z_vrfy_gpio_enable_callback(struct device *port,
static inline int z_vrfy_gpio_disable_callback(struct device *port,
gpio_pin_t pin)
{
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, disable_callback));
return z_impl_gpio_disable_callback((struct device *)port, pin);
}
#include <syscalls/gpio_disable_callback_mrsh.c>
static inline int z_vrfy_gpio_get_pending_int(struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(dev, get_pending_int));
return z_impl_gpio_get_pending_int((struct device *)dev);
}
#include <syscalls/gpio_get_pending_int_mrsh.c>