lkml.org 
[lkml]   [2019]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 2/3] hwmon/ltc2990: Generalise DT to fwnode support
From
Date
On 08/15/2019 02:58 PM, Max Staudt wrote:
> - if (of_node) {
> - ret = of_property_read_u32_array(of_node, "lltc,meas-mode",
> - data->mode, 2);
> + if (i2c->dev.of_node || i2c->dev.fwnode) {

One more idea, would it be better here to do the following?

if (device_property_present(i2c->dev, "lltc,meas-mode")) {
ret = of_property_read_u32_array(of_node, "lltc,meas-mode",
data->mode, 2);
}

I'm happy to prepare a patch if you wish to have this in - just let me know whether it should be on top of the last one, or instead of it.

Thanks,
Max

\
 
 \ /
  Last update: 2019-08-16 00:29    [W:0.095 / U:24.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site