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

Commit 22181c12 authored by Kavya Nunna's avatar Kavya Nunna
Browse files

leds: qti-flash: Replace usleep_range with mdelay



There is a path in the client driver which enables flash
in atomic context. Replace usleep_range() with mdelay() to
avoid a schedule_in_atomic_context failure.

Change-Id: I9ac8e235eb9a12e92ec9ac1fddd6b1452a01ba39
Signed-off-by: default avatarKavya Nunna <knunna@codeaurora.org>
parent 5c2bab70
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -277,7 +277,7 @@ static int qti_flash_poll_vreg_ok(struct qti_flash_led *led)


	for (i = 0; i < 60; i++) {
	for (i = 0; i < 60; i++) {
		/* wait for the flash vreg_ok to be set */
		/* wait for the flash vreg_ok to be set */
		usleep_range(5000, 5500);
		mdelay(5);


		rc = power_supply_get_property(led->main_psy,
		rc = power_supply_get_property(led->main_psy,
					POWER_SUPPLY_PROP_FLASH_TRIGGER, &pval);
					POWER_SUPPLY_PROP_FLASH_TRIGGER, &pval);