[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190430222955.GA97523@ip-172-31-29-54.us-west-2.compute.internal>
Date: Tue, 30 Apr 2019 22:29:55 +0000
From: Alakesh Haloi <alakesh.haloi@...il.com>
To: linux-kernel@...r.kernel.org, linux-hwmon@...r.kernel.org,
Guenter Roeck <linux@...ck-us.net>,
Jean Delvare <jdelvare@...e.com>
Subject: [PATCH] hwmon: Convert to hwmon_device_register_with_info()
Booting linux on bare metal instance type causes this warning:
hwmon_device_register() is deprecated. Please convert the driver
to use hwmon_device_register_with_info().
This patch fixes this call to deprecated function in acpi_power_meter.c
Signed-off-by: Alakesh Haloi <alakesh.haloi@...il.com>
Cc: stable@...r.kernel.org
---
drivers/hwmon/acpi_power_meter.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
index e98591fa2528..d1b8029d0147 100644
--- a/drivers/hwmon/acpi_power_meter.c
+++ b/drivers/hwmon/acpi_power_meter.c
@@ -898,7 +898,9 @@ static int acpi_power_meter_add(struct acpi_device *device)
if (res)
goto exit_free;
- resource->hwmon_dev = hwmon_device_register(&device->dev);
+ resource->hwmon_dev = hwmon_device_register_with_info(&device->dev,
+ ACPI_POWER_METER_NAME,
+ &device->driver_data, NULL, NULL);
if (IS_ERR(resource->hwmon_dev)) {
res = PTR_ERR(resource->hwmon_dev);
goto exit_remove;
--
2.17.2
Powered by blists - more mailing lists