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

Commit 2f2a03e6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "leds: qpnp-flash: check power supply variable in flash led driver"

parents 2cb7ca64 fbc5cada
Loading
Loading
Loading
Loading
+10 −4
Original line number Original line Diff line number Diff line
@@ -1409,6 +1409,7 @@ static void qpnp_flash_led_work(struct work_struct *work)
			max_curr_avail_ma += flash_node->max_current;
			max_curr_avail_ma += flash_node->max_current;


		psy_prop.intval = true;
		psy_prop.intval = true;
		if (led->battery_psy) {
			rc = led->battery_psy->set_property(led->battery_psy,
			rc = led->battery_psy->set_property(led->battery_psy,
						POWER_SUPPLY_PROP_FLASH_ACTIVE,
						POWER_SUPPLY_PROP_FLASH_ACTIVE,
						&psy_prop);
						&psy_prop);
@@ -1417,6 +1418,11 @@ static void qpnp_flash_led_work(struct work_struct *work)
					"Failed to setup OTG pulse skip enable\n");
					"Failed to setup OTG pulse skip enable\n");
				goto exit_flash_led_work;
				goto exit_flash_led_work;
			}
			}
		} else {
			dev_err(&led->spmi_dev->dev,
					"led->battery_psy is NULL\n");
			goto exit_flash_led_work;
		}


		if (led->pdata->power_detect_en ||
		if (led->pdata->power_detect_en ||
					led->pdata->die_current_derate_en) {
					led->pdata->die_current_derate_en) {