]> git.baikalelectronics.ru Git - kernel.git/commit
backlight: pwm_bl: Don't assign levels table repeatedly
authorMatthias Kaehlcke <mka@chromium.org>
Wed, 2 Oct 2019 16:56:01 +0000 (09:56 -0700)
committerLee Jones <lee.jones@linaro.org>
Mon, 14 Oct 2019 07:57:45 +0000 (08:57 +0100)
commit30736721c3254128962b9a0cb48d4779023ad98e
treedc3d58df4414e32a169bf2a20fa84c310298a324
parent9040b18894eff610bdbef32148a071e47db4bf83
backlight: pwm_bl: Don't assign levels table repeatedly

pwm_backlight_probe() re-assigns pb->levels for every brightness
level. This is not needed and was likely not intended, since
neither side of the assignment changes during the loop. Assign
the field only once.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/video/backlight/pwm_bl.c