Commit fabb1f81 authored by Huisong Li's avatar Huisong Li Committed by Guenter Roeck
Browse files

hwmon: (acpi_power_meter) Fix fail to load module on platform without _PMD method



According to the ACPI specification, the _PMD method is optional. The
acpi_power_meter driver shouldn't fail to load if the platform has no
_PMD method.

Signed-off-by: default avatarHuisong Li <lihuisong@huawei.com>
Message-ID: <20241112021228.22914-1-lihuisong@huawei.com>
[groeck: Reworded commit description]
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 57ee12b6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -680,8 +680,9 @@ static int setup_attrs(struct acpi_power_meter_resource *resource)
{
	int res = 0;

	/* _PMD method is optional. */
	res = read_domain_devices(resource);
	if (res)
	if (res != -ENODEV)
		return res;

	if (resource->caps.flags & POWER_METER_CAN_MEASURE) {