All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: カオ・ヴァン・ドン <cv-dong@jinso.co.jp>
Cc: "Mark Brown" <broonie@kernel.org>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Linux PM list" <linux-pm@vger.kernel.org>,
	"Marc Zyngier" <marc.zyngier@arm.com>,
	"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
	"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	稲吉 <h-inayoshi@jinso.co.jp>, Dung:人ソ <nv-dung@jinso.co.jp>,
	"Hoan Nguyen An" <na-hoan@jinso.co.jp>,
	"Eduardo Valentin" <edubezval@gmail.com>,
	"Enric Balletbo i Serra" <enric.balletbo@collabora.com>,
	"Guenter Roeck" <linux@roeck-us.net>
Subject: Re: [PATCH v2] thermal_hwmon: Fix the 'No sensors found' error after replacing the parameter NULL by the actual device
Date: Wed, 3 Oct 2018 09:35:05 +0200	[thread overview]
Message-ID: <CAMuHMdVmqxdgnaAV2RjWbPby=QDHFeJN2QcHmCv=joSHnU=9PQ@mail.gmail.com> (raw)
In-Reply-To: <1538551551-3431-1-git-send-email-cv-dong@jinso.co.jp>

CC Eduardo, Enric, Günter,

On Wed, Oct 3, 2018 at 9:27 AM Cao Van Dong <cv-dong@jinso.co.jp> wrote:
> Formerly, when registering the hwmon device, we pass NULL as the device. It's not a problem.
> Recently, the developer has replaced the parameter NULL as the device by the actual device.
> This causes the "No sensors found" error. Therefore, instead of using the device we will use pass
> the parent of that device as parameter. This will sync with the processor on the hwmon core.
> This patch is to fix this error.
>
> This patch is based on the v4.19-rc3 tag.

Fixes: f6b6b52ef7a54160 ("thermal_hwmon: Pass the originating device
down to hwmon_device_register_with_info")

> --- a/drivers/thermal/thermal_hwmon.c
> +++ b/drivers/thermal/thermal_hwmon.c
> @@ -143,7 +143,7 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
>         INIT_LIST_HEAD(&hwmon->tz_list);
>         strlcpy(hwmon->type, tz->type, THERMAL_NAME_LENGTH);
>         strreplace(hwmon->type, '-', '_');
> -       hwmon->device = hwmon_device_register_with_info(&tz->device, hwmon->type,
> +       hwmon->device = hwmon_device_register_with_info(tz->device.parent, hwmon->type,
>                                                         hwmon, NULL, NULL);
>         if (IS_ERR(hwmon->device)) {
>                 result = PTR_ERR(hwmon->device);

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2018-10-03 14:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03  7:25 [PATCH v2] thermal_hwmon: Fix the 'No sensors found' error after replacing the parameter NULL by the actual device Cao Van Dong
2018-10-03  7:35 ` Geert Uytterhoeven [this message]
2018-10-03  8:07 ` Marc Zyngier
2018-10-04  1:29   ` Cao Van Dong
2018-10-04 16:56     ` Guenter Roeck

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='CAMuHMdVmqxdgnaAV2RjWbPby=QDHFeJN2QcHmCv=joSHnU=9PQ@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=broonie@kernel.org \
    --cc=cv-dong@jinso.co.jp \
    --cc=edubezval@gmail.com \
    --cc=enric.balletbo@collabora.com \
    --cc=geert+renesas@glider.be \
    --cc=h-inayoshi@jinso.co.jp \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=marc.zyngier@arm.com \
    --cc=na-hoan@jinso.co.jp \
    --cc=nv-dung@jinso.co.jp \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.