summaryrefslogtreecommitdiffstats
path: root/drivers/auxdisplay/ht16k33.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:17:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:17:46 +0000
commit7f3a4257159dea8e7ef66d1a539dc6df708b8ed3 (patch)
treebcc69b5f4609f348fac49e2f59e210b29eaea783 /drivers/auxdisplay/ht16k33.c
parentAdding upstream version 6.9.12. (diff)
downloadlinux-7f3a4257159dea8e7ef66d1a539dc6df708b8ed3.tar.xz
linux-7f3a4257159dea8e7ef66d1a539dc6df708b8ed3.zip
Adding upstream version 6.10.3.upstream/6.10.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/auxdisplay/ht16k33.c')
-rw-r--r--drivers/auxdisplay/ht16k33.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c
index 96acfb2b58..8a7034b41d 100644
--- a/drivers/auxdisplay/ht16k33.c
+++ b/drivers/auxdisplay/ht16k33.c
@@ -284,27 +284,14 @@ static int ht16k33_initialize(struct ht16k33_priv *priv)
static int ht16k33_bl_update_status(struct backlight_device *bl)
{
- int brightness = bl->props.brightness;
+ const int brightness = backlight_get_brightness(bl);
struct ht16k33_priv *priv = bl_get_data(bl);
- if (bl->props.power != FB_BLANK_UNBLANK ||
- bl->props.fb_blank != FB_BLANK_UNBLANK ||
- bl->props.state & BL_CORE_FBBLANK)
- brightness = 0;
-
return ht16k33_brightness_set(priv, brightness);
}
-static int ht16k33_bl_check_fb(struct backlight_device *bl, struct fb_info *fi)
-{
- struct ht16k33_priv *priv = bl_get_data(bl);
-
- return (fi == NULL) || (fi->par == priv);
-}
-
static const struct backlight_ops ht16k33_bl_ops = {
.update_status = ht16k33_bl_update_status,
- .check_fb = ht16k33_bl_check_fb,
};
/*
@@ -496,6 +483,7 @@ static int ht16k33_led_probe(struct device *dev, struct led_classdev *led,
led->max_brightness = MAX_BRIGHTNESS;
err = devm_led_classdev_register_ext(dev, led, &init_data);
+ fwnode_handle_put(init_data.fwnode);
if (err)
dev_err(dev, "Failed to register LED\n");