Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c6c4184 authored by Chun Zhang's avatar Chun Zhang Committed by Gerrit - the friendly Code Review server
Browse files

leds: leds-qpnp-flash: fix torch 1 reference in driver



Torch1 control in LED enablement call path was broken due to a
wrong dereference. That leads to incorrect brightness value written
into register and cause malfunction.

Change-Id: Id51671f61e8b3988f95c423c48d1e720eab514a9
Signed-off-by: default avatarChun Zhang <chunz@codeaurora.org>
parent cdecac51
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1037,7 +1037,7 @@ static void qpnp_flash_led_work(struct work_struct *work)
			if (led->flash_node[3].flash_on)
				flash_node->trigger |= FLASH_LED1_TRIGGER;

			val = (u8)(flash_node[3].prgm_current *
			val = (u8)(led->flash_node[3].prgm_current *
						FLASH_TORCH_MAX_LEVEL
					/ led->flash_node[3].max_current);
			rc = qpnp_led_masked_write(led->spmi_dev,