2014-06-18 20:28:21

by Sorin Manolache

[permalink] [raw]
Subject: drivers/acpi/ac.c, re-enabling CONFIG_ACPI_PROCFS_POWER?

Hello,

Would it be worth considering re-enabling the old procfs interface for
ac.c? There are old tools still around (kpowersave from kde 3.5.10) that
expect /proc/acpi/ac_adapter.

Thank you,
Sorin


2014-06-18 23:01:19

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: drivers/acpi/ac.c, re-enabling CONFIG_ACPI_PROCFS_POWER?

On Wednesday, June 18, 2014 10:28:12 PM Sorin Manolache wrote:
> Hello,
>
> Would it be worth considering re-enabling the old procfs interface for
> ac.c? There are old tools still around (kpowersave from kde 3.5.10) that
> expect /proc/acpi/ac_adapter.

Can you please CC ACPI-related messages to [email protected]?

I'm not sure how much effort that would require at this point. Rui, Tianyu?

Rafael

2014-06-19 06:33:43

by Lan Tianyu

[permalink] [raw]
Subject: Re: drivers/acpi/ac.c, re-enabling CONFIG_ACPI_PROCFS_POWER?

On 2014年06月19日 07:17, Rafael J. Wysocki wrote:
> On Wednesday, June 18, 2014 10:28:12 PM Sorin Manolache wrote:
>> Hello,
>>
>> Would it be worth considering re-enabling the old procfs interface for
>> ac.c? There are old tools still around (kpowersave from kde 3.5.10) that
>> expect /proc/acpi/ac_adapter.
>
> Can you please CC ACPI-related messages to [email protected]?
>
> I'm not sure how much effort that would require at this point. Rui, Tianyu?

I think we need to revert commit ab0fd67.

commit ab0fd674d6cef0904baa511f22613ef6474f8169
Author: Lan Tianyu <[email protected]>
Date: Sat Oct 12 21:04:48 2013 +0800

ACPI / AC: Remove AC's proc directory.

AC's proc directory is not used and so remove it. Prepare for removing
/proc/acpi directory.

Signed-off-by: Lan Tianyu <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>


>
> Rafael
>


--
Best regards
Tianyu Lan

2014-06-19 07:49:05

by Lan Tianyu

[permalink] [raw]
Subject: Re: drivers/acpi/ac.c, re-enabling CONFIG_ACPI_PROCFS_POWER?

On 2014年06月19日 14:32, Lan Tianyu wrote:
> On 2014年06月19日 07:17, Rafael J. Wysocki wrote:
>> On Wednesday, June 18, 2014 10:28:12 PM Sorin Manolache wrote:
>>> Hello,
>>>
>>> Would it be worth considering re-enabling the old procfs interface for
>>> ac.c? There are old tools still around (kpowersave from kde 3.5.10) that
>>> expect /proc/acpi/ac_adapter.
>>
>> Can you please CC ACPI-related messages to [email protected]?
>>
>> I'm not sure how much effort that would require at this point. Rui, Tianyu?
>
> I think we need to revert commit ab0fd67.
>
> commit ab0fd674d6cef0904baa511f22613ef6474f8169
> Author: Lan Tianyu <[email protected]>
> Date: Sat Oct 12 21:04:48 2013 +0800
>
> ACPI / AC: Remove AC's proc directory.
>
> AC's proc directory is not used and so remove it. Prepare for removing
> /proc/acpi directory.
>
> Signed-off-by: Lan Tianyu <[email protected]>
> Signed-off-by: Rafael J. Wysocki <[email protected]>
>

Hi Sorin:
Please try the patch in the attachment.

>
>>
>> Rafael
>>
>
>


--
Best regards
Tianyu Lan


Attachments:
0001-Revert-ACPI-AC-Remove-AC-s-proc-directory.patch (5.99 kB)

2014-06-19 19:55:40

by Sorin Manolache

[permalink] [raw]
Subject: Re: drivers/acpi/ac.c, re-enabling CONFIG_ACPI_PROCFS_POWER?

On 2014-06-19 09:47, Lan Tianyu wrote:
> On 2014年06月19日 14:32, Lan Tianyu wrote:
>> On 2014年06月19日 07:17, Rafael J. Wysocki wrote:
>>> On Wednesday, June 18, 2014 10:28:12 PM Sorin Manolache wrote:
>>>> Hello,
>>>>
>>>> Would it be worth considering re-enabling the old procfs interface for
>>>> ac.c? There are old tools still around (kpowersave from kde 3.5.10) that
>>>> expect /proc/acpi/ac_adapter.
>>>
>>> Can you please CC ACPI-related messages to [email protected]?
>>>
>>> I'm not sure how much effort that would require at this point. Rui, Tianyu?
>>
>> I think we need to revert commit ab0fd67.
>>
>> commit ab0fd674d6cef0904baa511f22613ef6474f8169
>> Author: Lan Tianyu <[email protected]>
>> Date: Sat Oct 12 21:04:48 2013 +0800
>>
>> ACPI / AC: Remove AC's proc directory.
>>
>> AC's proc directory is not used and so remove it. Prepare for removing
>> /proc/acpi directory.
>>
>> Signed-off-by: Lan Tianyu <[email protected]>
>> Signed-off-by: Rafael J. Wysocki <[email protected]>
>>
>
> Hi Sorin:
> Please try the patch in the attachment.
>

Hello Tianyu,

I've applied the patch to 3.15.1. The code did not compile because of
ac->adev in acpi_ac_add_fs and acpi_ac_remove_fs. The acpi_ac structure
contains a field "device" and not "adev". So I've modified the patch and
I've attached it.

Now it works.

Thank you,
Sorin







>>
>>>
>>> Rafael
>>>
>>
>>
>
>



Attachments:
0001-Revert-ACPI-AC-Remove-AC-s-proc-directory.patch (6.00 kB)