Merge "leds: qti-flash: Limit off_time of switch to a maximum of 1280 ms"

This commit is contained in:
qctecmdr 2020-05-23 16:46:21 -07:00 • committed by Gerrit - the friendly Code Review server
commit bd555ae76a

View file

@ -1032,6 +1032,8 @@ static ssize_t qti_flash_off_time_store(struct device *dev,
if (rc < 0)
return rc;
val = min_t(u64, val, SAFETY_TIMER_MAX_TIMEOUT_MS);
snode = container_of(led_cdev, struct flash_switch_data, cdev);
snode->off_time_ms = val;