From: Guenter Roeck <linux@roeck-us.net>
To: Flaviu Nistor <flaviu.nistor@gmail.com>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: (tmp102) Change mode to read label property
Date: Sat, 9 May 2026 04:39:04 -0700 [thread overview]
Message-ID: <e5ea765f-3249-449d-940e-d9bc6d5ec623@roeck-us.net> (raw)
In-Reply-To: <20260509112417.51164-1-flaviu.nistor@gmail.com>
On 5/9/26 04:24, Flaviu Nistor wrote:
> Replace of_property_read_string() with the preferred
> device_property_read_string() in the probe function to
> read the device label property, improving the driver
> compatibility since this method is not limited to
> Device Tree only.
>
The subject of this patch is completely off ...
"change mode" - what does this even mean ?
> Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
> ---
> drivers/hwmon/tmp102.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/tmp102.c b/drivers/hwmon/tmp102.c
> index 3aa1a3fbeaa9..a89cc49798f5 100644
> --- a/drivers/hwmon/tmp102.c
> +++ b/drivers/hwmon/tmp102.c
> @@ -313,7 +313,7 @@ static int tmp102_probe(struct i2c_client *client)
> if (!tmp102)
> return -ENOMEM;
>
> - of_property_read_string(dev->of_node, "label", &tmp102->label);
> + device_property_read_string(dev, "label", &tmp102->label);
>
Changing this also requires changing include files.
Instead of including linux/of.h, you'll need to include
linux/mod_devicetable.h and linux/property.h.
Thanks,
Guenter
prev parent reply other threads:[~2026-05-09 11:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-09 11:24 [PATCH] hwmon: (tmp102) Change mode to read label property Flaviu Nistor
2026-05-09 11:37 ` sashiko-bot
2026-05-09 11:39 ` Guenter Roeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e5ea765f-3249-449d-940e-d9bc6d5ec623@roeck-us.net \
--to=linux@roeck-us.net \
--cc=flaviu.nistor@gmail.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox