Hi Sakari,
On 3/1/19 10:43 AM, Sakari Ailus wrote:
Hi Jacek,
On Wed, Feb 27, 2019 at 08:19:14PM +0100, Jacek Anaszewski wrote:
@@ -568,15 +573,21 @@ static int as3645a_parse_node(struct as3645a *flash,
goto out_err;
}
- rval = of_property_read_string(flash->indicator_node, "label", &name);
- if (!rval)
+ rval = fwnode_property_read_string(flash->indicator_node, "label",
+ &name);
+ if (!rval) {
strlcpy(names->indicator, name, sizeof(names->indicator));
- else
+ } else if (is_of_node(fwnode)) {
snprintf(names->indicator, sizeof(names->indicator),
- "%pOFn:indicator", node);
+ "%pOFn:indicator", to_of_node(fwnode));
+ } else {
+ dev_err(&flash->client->dev, "flash node has no label!\n");
+ return -EINVAL;
+ }
s/flash node/indicator node/
If you agree, I can amend it myself.
Yes, please do. Thanks!!
Amended as above and applied to the for-5.2 branch of linux-leds.git,
thanks.
--
Best regards,
Jacek Anaszewski