From: "lihuisong (C)" <lihuisong@huawei.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: <linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<liuyonglong@huawei.com>, <zhanjie9@hisilicon.com>
Subject: Re: [PATCH v1 2/2] hwmon: (acpi_power_meter) Fix fail to load module on platform without _PMD method
Date: Thu, 7 Nov 2024 20:07:48 +0800 [thread overview]
Message-ID: <ccf33114-4ccd-ed2e-cdbf-84de8525911a@huawei.com> (raw)
In-Reply-To: <CAJZ5v0hcEn_XhBPLstFyvqE=2iCG51wvcbGHf2nKaFJU5ynytQ@mail.gmail.com>
在 2024/11/7 18:55, Rafael J. Wysocki 写道:
> On Thu, Nov 7, 2024 at 4:37 AM Huisong Li <lihuisong@huawei.com> wrote:
>> As ACPI spec said, _PMD method is optional. The acpi_power_meter
>> shouldn't fail to load when the platform hasn't _PMD method.
>>
>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
> How exactly is this related to the first patch?
They're not related, they're just similar.
Sorry, I should separate them😂
Should I resend them now?
>
>> ---
>> drivers/hwmon/acpi_power_meter.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
>> index 6c8a9c863528..2f1c9d97ad21 100644
>> --- a/drivers/hwmon/acpi_power_meter.c
>> +++ b/drivers/hwmon/acpi_power_meter.c
>> @@ -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) {
>> --
>> 2.22.0
>>
>>
> .
prev parent reply other threads:[~2024-11-07 12:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-07 3:26 [PATCH v1 0/2] Add _TZD method for ACPI thermal Huisong Li
2024-11-07 3:26 ` [PATCH v1 1/2] ACPI: thermal: Support for linking devices associated with the thermal zone Huisong Li
2024-11-07 3:26 ` [PATCH v1 2/2] hwmon: (acpi_power_meter) Fix fail to load module on platform without _PMD method Huisong Li
2024-11-07 10:55 ` Rafael J. Wysocki
2024-11-07 12:07 ` lihuisong (C) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ccf33114-4ccd-ed2e-cdbf-84de8525911a@huawei.com \
--to=lihuisong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=liuyonglong@huawei.com \
--cc=rafael@kernel.org \
--cc=zhanjie9@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®