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

Commit 364475ab authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "leds: qti-tri-led: Cancel set_brightness_work before setting breath"

parents 8da9395f c8ff1c7c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 */

#include <linux/bitops.h>
@@ -371,6 +371,8 @@ static ssize_t breath_store(struct device *dev, struct device_attribute *attr,
	if (rc < 0)
		return rc;

	cancel_work_sync(&led_cdev->set_brightness_work);

	mutex_lock(&led->lock);
	if (led->breathing == breath)
		goto unlock;