lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 16 Aug 2019 00:19:42 +0200
From:   Max Staudt <max@...as.org>
To:     linux-i2c@...r.kernel.org, linux-hwmon@...r.kernel.org,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Jean Delvare <jdelvare@...e.com>,
        Guenter Roeck <linux@...ck-us.net>
Cc:     linux-m68k@...r.kernel.org, linux-kernel@...r.kernel.org,
        glaubitz@...sik.fu-berlin.de
Subject: Re: [PATCH v3 2/3] hwmon/ltc2990: Generalise DT to fwnode support

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ