Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Armin Wolf <W_Armin@gmx.de>
To: Jared Mauch <jared@puck.nether.net>, rydberg@bitmath.org
Cc: linux-hwmon@vger.kernel.org
Subject: Re: Patch: applesmc.c - update handling
Date: Thu, 20 Nov 2025 00:54:24 +0100	[thread overview]
Message-ID: <c5151e1f-cdf9-4d58-b00b-433f877b2ab3@gmx.de> (raw)
In-Reply-To: <aR5W2K2Ic06uPgBy@puck.nether.net>

Am 20.11.25 um 00:46 schrieb Jared Mauch:

> Updates code from hwmon_device_register to hwmon_device_register_with_info
>
> Signed-off-by: Jared Mauch <jared@puck.nether.net>
>
> diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
> index fc6d6a9053ce..984dfbf40233 100644
> --- a/drivers/hwmon/applesmc.c
> +++ b/drivers/hwmon/applesmc.c
> @@ -1362,7 +1362,7 @@ static int __init applesmc_init(void)
>   	if (ret)
>   		goto out_light_sysfs;
>   
> -	hwmon_dev = hwmon_device_register(&pdev->dev);
> +	hwmon_dev = hwmon_device_register_with_info(&pdev->dev, "applesmc", NULL, NULL, NULL);

That is not how you migrate a driver from hwmon_device_register() to hwmon_device_register_with_info().
You are expected to also move the sysfs-centric attribute handling to struct hwmon_chip_info.

Thanks,
Armin Wolf

>   	if (IS_ERR(hwmon_dev)) {
>   		ret = PTR_ERR(hwmon_dev);
>   		goto out_light_ledclass;
>
>

  reply	other threads:[~2025-11-19 23:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-19 23:46 Patch: applesmc.c - update handling Jared Mauch
2025-11-19 23:54 ` Armin Wolf [this message]
2025-11-20  2:03   ` Jared Mauch
2025-11-20  2:39     ` Armin Wolf
2025-11-20  2:39 ` 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=c5151e1f-cdf9-4d58-b00b-433f877b2ab3@gmx.de \
    --to=w_armin@gmx.de \
    --cc=jared@puck.nether.net \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=rydberg@bitmath.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