projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5656a7
)
mfd: qcom-spmi-pmic: Don't access non-existing registers
author
Ivan T. Ivanov
<
[email protected]
>
Wed, 18 Nov 2015 00:06:44 +0000
(16:06 -0800)
committer
Lee Jones
<
[email protected]
>
Mon, 11 Jan 2016 06:23:32 +0000
(06:23 +0000)
Revision ID registers are available only on devices with
Slave IDs that are even, so don't make access to unavailable
registers.
Signed-off-by: Ivan T. Ivanov <
[email protected]
>
[
[email protected]
: Consider all slave ids that are even]
Signed-off-by: Stephen Boyd <
[email protected]
>
Signed-off-by: Lee Jones <
[email protected]
>
drivers/mfd/qcom-spmi-pmic.c
patch
|
blob
|
history
diff --git
a/drivers/mfd/qcom-spmi-pmic.c
b/drivers/mfd/qcom-spmi-pmic.c
index af6ac1c4b45c6817e88ddfa965cf68c114e6aeea..8653e8b9bb4fc29359a1b84e7dd676f7cf4b2d9b 100644
(file)
--- a/
drivers/mfd/qcom-spmi-pmic.c
+++ b/
drivers/mfd/qcom-spmi-pmic.c
@@
-127,7
+127,9
@@
static int pmic_spmi_probe(struct spmi_device *sdev)
if (IS_ERR(regmap))
return PTR_ERR(regmap);
- pmic_spmi_show_revid(regmap, &sdev->dev);
+ /* Only the first slave id for a PMIC contains this information */
+ if (sdev->usid % 2 == 0)
+ pmic_spmi_show_revid(regmap, &sdev->dev);
return of_platform_populate(root, NULL, NULL, &sdev->dev);
}