diff --git a/sys/compat/linuxkpi/common/include/linux/backlight.h b/sys/compat/linuxkpi/common/include/linux/backlight.h --- a/sys/compat/linuxkpi/common/include/linux/backlight.h +++ b/sys/compat/linuxkpi/common/include/linux/backlight.h @@ -91,6 +91,16 @@ bd->props.brightness = bd->ops->get_brightness(bd); } +static inline int +backlight_device_set_brightness(struct backlight_device *bd, int brightness) +{ + + if (brightness > bd->props.max_brightness) + return (EINVAL); + bd->props.brightness = brightness; + return (bd->ops->update_status(bd)); +} + static inline int backlight_enable(struct backlight_device *bd) {