From b677cc654015213985b08482a67ecb8ba8b4d802 Mon Sep 17 00:00:00 2001 From: Miguel de Dios Date: Thu, 7 Feb 2019 17:06:56 -0800 Subject: [PATCH] thermal: fix lockdep splat from qcom driver The attribute dynamically allocated should be initialized with sysfs_attr_init. Otherwise, lockdep slaps us. Bug: 122096541 Bug: 123720375 Change-Id: I5f8aa327729fb51b955b148b7fb5dc0f85d3fbbb Signed-off-by: Minchan Kim Signed-off-by: Miguel de Dios Signed-off-by: UtsavBalar1231 --- drivers/thermal/qcom/msm_lmh_dcvs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/thermal/qcom/msm_lmh_dcvs.c b/drivers/thermal/qcom/msm_lmh_dcvs.c index 0c707624adb7..c462e5dae983 100644 --- a/drivers/thermal/qcom/msm_lmh_dcvs.c +++ b/drivers/thermal/qcom/msm_lmh_dcvs.c @@ -758,6 +758,7 @@ static int limits_dcvs_probe(struct platform_device *pdev) hw->lmh_freq_attr.attr.name = "lmh_freq_limit"; hw->lmh_freq_attr.show = lmh_freq_limit_show; hw->lmh_freq_attr.attr.mode = 0444; + sysfs_attr_init(&hw->lmh_freq_attr.attr); device_create_file(&pdev->dev, &hw->lmh_freq_attr); probe_exit: