On Tue, Feb 23, 2016 at 01:17:25PM -0500, David Rivshin (Allworx) wrote: > From: David Rivshin <drivshin@xxxxxxxxxxx> > +static int is31fl32xx_parse_child_dt(const struct device *dev, > + const struct device_node *child, > + struct is31fl32xx_led_data *led_data) > +{ > + struct led_classdev *cdev = &led_data->cdev; > + int ret = 0; > + u32 reg; > + > + cdev->name = of_get_property(child, "label", NULL) ? : child->name; We really shouldn't be spreading of_get_property into more drivers. It's generally not what you want, and doesn't do appropriate sanity checking. Use of_property_read_string, though you may need to copy the result. > + > + ret = of_property_read_u32(child, "reg", ®); > + if (ret || reg < 1 || reg > led_data->priv->cdef->channels) { > + dev_err(dev, > + "Child node %s does not have a valid reg property\n", > + child->name); > + return -EINVAL; > + } > + led_data->channel = reg; > + > + cdev->default_trigger = of_get_property(child, "linux,default-trigger", > + NULL); Likewise. Thanks, Mark. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html