diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/backlight/backlight.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 4840fe217e4d..39394757679c 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c | |||
@@ -94,8 +94,10 @@ static ssize_t backlight_store_power(struct device *dev, | |||
94 | mutex_lock(&bd->ops_lock); | 94 | mutex_lock(&bd->ops_lock); |
95 | if (bd->ops) { | 95 | if (bd->ops) { |
96 | pr_debug("backlight: set power to %d\n", power); | 96 | pr_debug("backlight: set power to %d\n", power); |
97 | bd->props.power = power; | 97 | if (bd->props.power != power) { |
98 | backlight_update_status(bd); | 98 | bd->props.power = power; |
99 | backlight_update_status(bd); | ||
100 | } | ||
99 | rc = count; | 101 | rc = count; |
100 | } | 102 | } |
101 | mutex_unlock(&bd->ops_lock); | 103 | mutex_unlock(&bd->ops_lock); |
@@ -132,8 +134,10 @@ static ssize_t backlight_store_brightness(struct device *dev, | |||
132 | else { | 134 | else { |
133 | pr_debug("backlight: set brightness to %d\n", | 135 | pr_debug("backlight: set brightness to %d\n", |
134 | brightness); | 136 | brightness); |
135 | bd->props.brightness = brightness; | 137 | if (bd->props.brightness != brightness) { |
136 | backlight_update_status(bd); | 138 | bd->props.brightness = brightness; |
139 | backlight_update_status(bd); | ||
140 | } | ||
137 | rc = count; | 141 | rc = count; |
138 | } | 142 | } |
139 | } | 143 | } |