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

Commit e5702b05 authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

backlight: qcom-spmi-wled: Initialize mutex before it can be used



Initialize mutex lock early so that it can be used properly when
an interrupt handler is called right after registering for it.

Change-Id: Ie2ec354e668d4681c9b7e01751e9dd426a295aa4
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent b1a1a12b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2304,6 +2304,8 @@ static int wled_probe(struct platform_device *pdev)
		return rc;
	}

	mutex_init(&wled->lock);

	val = WLED_DEFAULT_BRIGHTNESS;
	of_property_read_u32(pdev->dev.of_node, "default-brightness", &val);
	wled->brightness = val;
@@ -2333,7 +2335,6 @@ static int wled_probe(struct platform_device *pdev)
		return rc;
	}

	mutex_init(&wled->lock);
	platform_set_drvdata(pdev, wled);

	memset(&props, 0, sizeof(struct backlight_properties));