diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 09:45:37 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 09:45:37 -0800 |
commit | 4383f18b7f94a4d668c5eec68645c75d44556235 (patch) | |
tree | 829ef77b976fb914c65166ac906595e5c0264f0f /drivers/video/backlight/backlight.c | |
parent | 3d50337f62a61027f40ad4ceddefa3c91e5d479e (diff) | |
parent | ec072b0f8bc8e885a8572418ad4b6802c027ca01 (diff) |
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight:
backlight: Add OMAP1 PWL backlight driver
backlight: Avoid unecessary driver callbacks
Diffstat (limited to 'drivers/video/backlight/backlight.c')
-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, mutex_lock(&bd->ops_lock); if (bd->ops) { pr_debug("backlight: set power to %d\n", power); - bd->props.power = power; - backlight_update_status(bd); + if (bd->props.power != power) { + bd->props.power = power; + backlight_update_status(bd); + } rc = count; } mutex_unlock(&bd->ops_lock); @@ -132,8 +134,10 @@ static ssize_t backlight_store_brightness(struct device *dev, else { pr_debug("backlight: set brightness to %d\n", brightness); - bd->props.brightness = brightness; - backlight_update_status(bd); + if (bd->props.brightness != brightness) { + bd->props.brightness = brightness; + backlight_update_status(bd); + } rc = count; } } |