Skip to content

Commit fabb1f8

Browse files
LiHuiSong1groeck
authored andcommitted
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: Huisong Li <[email protected]> Message-ID: <[email protected]> [groeck: Reworded commit description] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 57ee12b commit fabb1f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/hwmon/acpi_power_meter.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,8 +680,9 @@ static int setup_attrs(struct acpi_power_meter_resource *resource)
680680
{
681681
int res = 0;
682682

683+
/* _PMD method is optional. */
683684
res = read_domain_devices(resource);
684-
if (res)
685+
if (res != -ENODEV)
685686
return res;
686687

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

0 commit comments

Comments
 (0)