Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-15 11:44:04 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-15 11:44:12 +0200
commitce797408ad07b86c89d4526dc9cc12b94fa1c424 (patch)
treeec92297218ea5f1bc166e02f50ebda6abe3d6484
parent861dafacf37a9aac871fb74457d819559bd96b0a (diff)
backlight: lm3630a: Return 0 on success in update_status
functions (bsc#1051510).
-rw-r--r--patches.drivers/backlight-lm3630a-Return-0-on-success-in-update_stat.patch50
-rw-r--r--series.conf1
2 files changed, 51 insertions, 0 deletions
diff --git a/patches.drivers/backlight-lm3630a-Return-0-on-success-in-update_stat.patch b/patches.drivers/backlight-lm3630a-Return-0-on-success-in-update_stat.patch
new file mode 100644
index 0000000000..9ad535a87b
--- /dev/null
+++ b/patches.drivers/backlight-lm3630a-Return-0-on-success-in-update_stat.patch
@@ -0,0 +1,50 @@
+From d3f48ec0954c6aac736ab21c34a35d7554409112 Mon Sep 17 00:00:00 2001
+From: Brian Masney <masneyb@onstation.org>
+Date: Wed, 24 Apr 2019 05:25:03 -0400
+Subject: [PATCH] backlight: lm3630a: Return 0 on success in update_status functions
+Git-commit: d3f48ec0954c6aac736ab21c34a35d7554409112
+Patch-mainline: v5.2-rc1
+References: bsc#1051510
+
+lm3630a_bank_a_update_status() and lm3630a_bank_b_update_status()
+both return the brightness value if the brightness was successfully
+updated. Writing to these attributes via sysfs would cause a 'Bad
+address' error to be returned. These functions should return 0 on
+success, so let's change it to correct that error.
+
+Fixes: 28e64a68a2ef ("backlight: lm3630: apply chip revision")
+Signed-off-by: Brian Masney <masneyb@onstation.org>
+Acked-by: Pavel Machek <pavel@ucw.cz>
+Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/video/backlight/lm3630a_bl.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c
+index 2030a6b77a09..ef2553f452ca 100644
+--- a/drivers/video/backlight/lm3630a_bl.c
++++ b/drivers/video/backlight/lm3630a_bl.c
+@@ -201,7 +201,7 @@ static int lm3630a_bank_a_update_status(struct backlight_device *bl)
+ LM3630A_LEDA_ENABLE, LM3630A_LEDA_ENABLE);
+ if (ret < 0)
+ goto out_i2c_err;
+- return bl->props.brightness;
++ return 0;
+
+ out_i2c_err:
+ dev_err(pchip->dev, "i2c failed to access\n");
+@@ -278,7 +278,7 @@ static int lm3630a_bank_b_update_status(struct backlight_device *bl)
+ LM3630A_LEDB_ENABLE, LM3630A_LEDB_ENABLE);
+ if (ret < 0)
+ goto out_i2c_err;
+- return bl->props.brightness;
++ return 0;
+
+ out_i2c_err:
+ dev_err(pchip->dev, "i2c failed to access REG_CTRL\n");
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 0fea18cec0..d5661dd3eb 100644
--- a/series.conf
+++ b/series.conf
@@ -21921,6 +21921,7 @@
patches.arch/x86-speculation-mds-add-mitigations-support-for-mds.patch
patches.drivers/PCI-Mark-AMD-Stoney-Radeon-R7-GPU-ATS-as-broken.patch
patches.drivers/PCI-Mark-Atheros-AR9462-to-avoid-bus-reset.patch
+ patches.drivers/backlight-lm3630a-Return-0-on-success-in-update_stat.patch
# dhowells/linux-fs keys-uefi
patches.suse/0001-KEYS-Allow-unrestricted-boot-time-addition-of-keys-t.patch