pm8xxx-adc: Fix lockdep warnings with key's not in .data
Devices attributes have lockdep keys and so they should exist in the data section. Failure to do this results in lockdep turning itself off and warnings such as: BUG: key eeb0883c not in .data! Fix this problem in the pm8xxx-adc driver by initializing the keys with sysfs_attr_init(). Change-Id: Ie42f9a28c343e32ef36ca3570d63a7bb557dfe64 Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
@@ -1083,6 +1083,7 @@ static int32_t pm8xxx_adc_init_hwmon(struct platform_device *pdev)
|
||||
adc_pmic->adc_channel[i].name;
|
||||
memcpy(&adc_pmic->sens_attr[i], &pm8xxx_adc_attr,
|
||||
sizeof(pm8xxx_adc_attr));
|
||||
sysfs_attr_init(&adc_pmic->sens_attr[i].dev_attr.attr);
|
||||
rc = device_create_file(&pdev->dev,
|
||||
&adc_pmic->sens_attr[i].dev_attr);
|
||||
if (rc) {
|
||||
|
||||
Reference in New Issue
Block a user