[PATCH 2/2] HID: hid-appletb-bl: fix incorrect error message for default brightness
From: Aditya Garg
Date: Wed Feb 12 2025 - 05:04:20 EST
From: Aditya Garg <gargaditya08@xxxxxxxx>
The error message responsible to show failure to set default backlight
brightness incorrectly showed the intended brightness as off irrespective
of what the user had set it. This patch intends to fix the same.
Signed-off-by: Aditya Garg <gargaditya08@xxxxxxxx>
---
drivers/hid/hid-appletb-bl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-appletb-bl.c b/drivers/hid/hid-appletb-bl.c
index 1a3dcd44b..8e15ad5b6 100644
--- a/drivers/hid/hid-appletb-bl.c
+++ b/drivers/hid/hid-appletb-bl.c
@@ -145,7 +145,8 @@ static int appletb_bl_probe(struct hid_device *hdev, const struct hid_device_id
appletb_bl_brightness_map[(appletb_bl_def_brightness > 2) ? 2 : appletb_bl_def_brightness]);
if (ret) {
- dev_err_probe(dev, ret, "Failed to set touch bar brightness to off\n");
+ dev_err_probe(dev, ret, "Failed to set default touch bar brightness to %d\n",
+ appletb_bl_def_brightness);
goto close_hw;
}
--
2.39.5 (Apple Git-154)