auxdisplay: Fix handlers file

Fixes usermode access issues with the auxdisplay driver.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae 2023-08-30 10:33:10 +01:00 committed by Chris Friedt
commit 28ba8368ad
3 changed files with 11 additions and 10 deletions

View file

@ -3,6 +3,7 @@
zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/auxdisplay.h)
zephyr_library()
zephyr_library_sources_ifdef(CONFIG_USERSPACE auxdisplay_handlers.c)
zephyr_library_sources_ifdef(CONFIG_AUXDISPLAY_HD44780 auxdisplay_hd44780.c)
zephyr_library_sources_ifdef(CONFIG_AUXDISPLAY_ITRON auxdisplay_itron.c)
zephyr_library_sources_ifdef(CONFIG_AUXDISPLAY_JHD1313 auxdisplay_jhd1313.c)

View file

@ -37,7 +37,7 @@ static inline int z_vrfy_auxdisplay_position_blinking_set_enabled(const struct d
#include <syscalls/auxdisplay_position_blinking_set_enabled_mrsh.c>
static inline int z_vrfy_auxdisplay_cursor_shift_set(const struct device *dev, uint8_t direction,
bool display_shift);
bool display_shift)
{
Z_OOPS(Z_SYSCALL_OBJ(dev, K_OBJ_DRIVER_AUXDISPLAY));
return z_impl_auxdisplay_cursor_shift_set(dev, direction, display_shift);
@ -78,13 +78,13 @@ static inline int z_vrfy_auxdisplay_display_position_get(const struct device *de
}
#include <syscalls/auxdisplay_display_position_get_mrsh.c>
static inline int z_vrfy_auxdisplay_capabilities_get_api(const struct device *dev,
static inline int z_vrfy_auxdisplay_capabilities_get(const struct device *dev,
struct auxdisplay_capabilities *capabilities)
{
Z_OOPS(Z_SYSCALL_OBJ(dev, K_OBJ_DRIVER_AUXDISPLAY));
return z_impl_auxdisplay_capabilities_get_api(dev, capabilities);
return z_impl_auxdisplay_capabilities_get(dev, capabilities);
}
#include <syscalls/auxdisplay_capabilities_get_api_mrsh.c>
#include <syscalls/auxdisplay_capabilities_get_mrsh.c>
static inline int z_vrfy_auxdisplay_clear(const struct device *dev)
{
@ -105,17 +105,17 @@ static inline int z_vrfy_auxdisplay_brightness_set(const struct device *dev,
uint8_t brightness)
{
Z_OOPS(Z_SYSCALL_OBJ(dev, K_OBJ_DRIVER_AUXDISPLAY));
return z_impl_auxdisplay_backlight_get(dev, backlight);
return z_impl_auxdisplay_brightness_set(dev, brightness);
}
#include <syscalls/auxdisplay_brightness_set_mrsh.c>
static inline int z_vrfy_auxdisplay_brightness_set(const struct device *dev,
uint8_t brightness)
static inline int z_vrfy_auxdisplay_backlight_get(const struct device *dev,
uint8_t *backlight)
{
Z_OOPS(Z_SYSCALL_OBJ(dev, K_OBJ_DRIVER_AUXDISPLAY));
return z_impl_auxdisplay_backlight_get(dev, backlight);
}
#include <syscalls/auxdisplay_brightness_set_mrsh.c>
#include <syscalls/auxdisplay_backlight_get_mrsh.c>
static inline int z_vrfy_auxdisplay_backlight_set(const struct device *dev,
uint8_t backlight)
@ -125,7 +125,7 @@ static inline int z_vrfy_auxdisplay_backlight_set(const struct device *dev,
}
#include <syscalls/auxdisplay_backlight_set_mrsh.c>
static inline bool z_vrfy_auxdisplay_is_busy(const struct device *dev)
static inline int z_vrfy_auxdisplay_is_busy(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_OBJ(dev, K_OBJ_DRIVER_AUXDISPLAY));
return z_impl_auxdisplay_is_busy(dev);

View file

@ -283,7 +283,7 @@ typedef int (*auxdisplay_write_t)(const struct device *dev, const uint8_t *data,
typedef int (*auxdisplay_custom_command_t)(const struct device *dev,
struct auxdisplay_custom_data *command);
struct auxdisplay_driver_api {
__subsystem struct auxdisplay_driver_api {
auxdisplay_display_on_t display_on;
auxdisplay_display_off_t display_off;
auxdisplay_cursor_set_enabled_t cursor_set_enabled;