Loading include/linux/of.h +10 −0 Original line number Diff line number Diff line Loading @@ -544,6 +544,16 @@ static inline bool of_property_read_bool(const struct device_node *np, { struct property *prop = of_find_property(np, propname, NULL); /* * Boolean properties have no value cells. The "value" of a boolean * property is determined by the presence or absence of the property * itself, and value cells are disregarded entirely. Declaring a * boolean property with a nonzero number of value cells is a common * configuration error, since even a boolean property having a value of * 0 will be treated as "true" by the DT framework. */ WARN_ON(prop && prop->length); return prop ? true : false; } Loading Loading
include/linux/of.h +10 −0 Original line number Diff line number Diff line Loading @@ -544,6 +544,16 @@ static inline bool of_property_read_bool(const struct device_node *np, { struct property *prop = of_find_property(np, propname, NULL); /* * Boolean properties have no value cells. The "value" of a boolean * property is determined by the presence or absence of the property * itself, and value cells are disregarded entirely. Declaring a * boolean property with a nonzero number of value cells is a common * configuration error, since even a boolean property having a value of * 0 will be treated as "true" by the DT framework. */ WARN_ON(prop && prop->length); return prop ? true : false; } Loading