[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8bccc21e-58ce-460f-b73b-de3b4cf383dd@t-8ch.de>
Date: Mon, 8 Apr 2024 17:11:57 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Armin Wolf <W_Armin@....de>
Cc: mlj@...elec.com, rafael.j.wysocki@...el.com, lenb@...nel.org,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
platform-driver-x86@...r.kernel.org
Subject: Re: [PATCH] ACPI: fan: Add hwmon support
Hi,
On 2024-04-08 14:37:18+0200, Armin Wolf wrote:
> Currently, the driver does only supports a custom sysfs
> interface to allow userspace to read the fan speed.
> Add support for the standard hwmon interface so users
> can read the fan speed with standard tools like "sensors".
>
> Signed-off-by: Armin Wolf <W_Armin@....de>
> ---
> drivers/acpi/Makefile | 1 +
> drivers/acpi/fan.h | 2 ++
> drivers/acpi/fan_core.c | 7 ++++
> drivers/acpi/fan_hwmon.c | 78 ++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 88 insertions(+)
> create mode 100644 drivers/acpi/fan_hwmon.c
[snip]
> +
> +int devm_acpi_fan_create_hwmon(struct acpi_device *device)
> +{
> + struct device *hdev;
> +
> + hdev = devm_hwmon_device_register_with_info(&device->dev, "acpi_fan", device,
> + &acpi_fan_chip_info, NULL);
This fails to link if CONFIG_ACPI_FAN=y and CONFIG_HWMON=n:
ld: vmlinux.o: in function `devm_acpi_fan_create_hwmon':
../drivers/acpi/fan_hwmon.c:74:(.text+0x819e65): undefined reference to `devm_hwmon_device_register_with_info'
With this fixed:
Reviewed-by: Thomas Weißschuh <linux@...ssschuh.net>
> +
> + return PTR_ERR_OR_ZERO(hdev);
> +}
> --
> 2.39.2
>
>
Powered by blists - more mailing lists