fbdev: omapfb: Use of_property_present() to test existence of DT property
of_property_read_bool() should be used only on boolean properties. Cc: Rob Herring <robh@kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
committed by
Helge Deller
parent
ed3f274b86
commit
65ea3b4d38
@@ -3933,7 +3933,7 @@ static int dispc_bind(struct device *dev, struct device *master, void *data)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (np && of_property_read_bool(np, "syscon-pol")) {
|
||||
if (np && of_property_present(np, "syscon-pol")) {
|
||||
dispc.syscon_pol = syscon_regmap_lookup_by_phandle(np, "syscon-pol");
|
||||
if (IS_ERR(dispc.syscon_pol)) {
|
||||
dev_err(&pdev->dev, "failed to get syscon-pol regmap\n");
|
||||
|
||||
Reference in New Issue
Block a user