summaryrefslogtreecommitdiff
path: root/sys/dev/backlight
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2022-05-25 14:48:10 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2022-06-01 07:12:18 +0000
commitb203d3de6b1a7ab38f0a1e3d944a1c4887e31a9b (patch)
treee380b5646d642b9ae0d698d84c0f994d2f4fcf84 /sys/dev/backlight
parent0b666a7c13f6512ced2a1ff253c1e0457c529e87 (diff)
Diffstat (limited to 'sys/dev/backlight')
-rw-r--r--sys/dev/backlight/backlight.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/backlight/backlight.c b/sys/dev/backlight/backlight.c
index 19d273ae55d8..2d3fe02d33e9 100644
--- a/sys/dev/backlight/backlight.c
+++ b/sys/dev/backlight/backlight.c
@@ -73,8 +73,10 @@ backlight_ioctl(struct cdev *dev, u_long cmd, caddr_t data,
/* Call the driver function so it fills up the props */
bcopy(data, &props, sizeof(struct backlight_props));
error = BACKLIGHT_GET_STATUS(sc->dev, &props);
- if (error == 0)
+ if (error == 0) {
bcopy(&props, data, sizeof(struct backlight_props));
+ sc->cached_brightness = props.brightness;
+ }
break;
case BACKLIGHTUPDATESTATUS:
bcopy(data, &props, sizeof(struct backlight_props));