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] [day] [month] [year] [list]
Message-ID: <a52663d8-dc5f-4360-87c7-5089f942dfe3@roeck-us.net>
Date:   Sun, 30 Apr 2023 05:49:46 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Chris Packham <chris.packham@...iedtelesis.co.nz>
Cc:     jdelvare@...e.com, manio@...boo.net, linux-hwmon@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] hwmon: (adt7475) Convert to use device_property
 APIs

On Wed, Apr 19, 2023 at 11:36:56AM +1200, Chris Packham wrote:
> Instead of of_property_read_*() use the equivalent
> device_property_read_*() API. This will allow these properties to be
> used on DT unaware platforms. For DT aware platforms this will be a
> noop.
> 
> Signed-off-by: Chris Packham <chris.packham@...iedtelesis.co.nz>

Applied to hwmon-next.

Thanks,
Guenter

> ---
> 
> Notes:
>     This is an additional update for master from the preceeding bugfix
>     commit. I've not added a fixes tag for this one because I don't think
>     there will be a behaviour change for existing usages.
>     
>     I know we have one upcoming DT unaware platform that we may want to use
>     some of these properties via ACPI tables so I won't object if this ends
>     up on the stable track but I don't think it meets the criteria for
>     stable.
> 
>  drivers/hwmon/adt7475.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c
> index 6a6ebcc896b1..3b9289bc5997 100644
> --- a/drivers/hwmon/adt7475.c
> +++ b/drivers/hwmon/adt7475.c
> @@ -1468,7 +1468,7 @@ static int load_config3(const struct i2c_client *client, const char *propname)
>  	u8 config3;
>  	int ret;
>  
> -	ret = of_property_read_string(client->dev.of_node, propname, &function);
> +	ret = device_property_read_string(&client->dev, propname, &function);
>  	if (!ret) {
>  		ret = adt7475_read(REG_CONFIG3);
>  		if (ret < 0)
> @@ -1494,7 +1494,7 @@ static int load_config4(const struct i2c_client *client, const char *propname)
>  	u8 config4;
>  	int ret;
>  
> -	ret = of_property_read_string(client->dev.of_node, propname, &function);
> +	ret = device_property_read_string(&client->dev, propname, &function);
>  	if (!ret) {
>  		ret = adt7475_read(REG_CONFIG4);
>  		if (ret < 0)
> @@ -1556,8 +1556,8 @@ static int set_property_bit(const struct i2c_client *client, char *property,
>  			    u8 *config, u8 bit_index)
>  {
>  	u32 prop_value = 0;
> -	int ret = of_property_read_u32(client->dev.of_node, property,
> -					&prop_value);
> +	int ret = device_property_read_u32(&client->dev, property,
> +					   &prop_value);
>  
>  	if (!ret) {
>  		if (prop_value)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ