[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220502124249.682058-2-clabbe@baylibre.com>
Date: Mon, 2 May 2022 12:42:49 +0000
From: Corentin Labbe <clabbe@...libre.com>
To: jdelvare@...e.com, linux@...ck-us.net
Cc: linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org,
Corentin Labbe <clabbe@...libre.com>
Subject: [PATCH 2/2] hwmon: acpi_power_meter: convert to hwmon_device_register_with_info
Booting lead to a hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
So let's convert the driver to use hwmon_device_register_with_info().
Signed-off-by: Corentin Labbe <clabbe@...libre.com>
---
drivers/hwmon/acpi_power_meter.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
index d2545a1be9fc..98293727f980 100644
--- a/drivers/hwmon/acpi_power_meter.c
+++ b/drivers/hwmon/acpi_power_meter.c
@@ -891,7 +891,10 @@ static int acpi_power_meter_add(struct acpi_device *device)
if (res)
goto exit_free_capability;
- resource->hwmon_dev = hwmon_device_register(&device->dev);
+ resource->hwmon_dev = hwmon_device_register_with_info(&device->dev,
+ ACPI_POWER_METER_DEVICE_NAME,
+ NULL, NULL,
+ NULL);
if (IS_ERR(resource->hwmon_dev)) {
res = PTR_ERR(resource->hwmon_dev);
goto exit_remove;
--
2.35.1
Powered by blists - more mailing lists