Re: [PATCH] PM: HIBERNATION: add resume_delay kernel param as well as resume_delay

From: Barry Song
Date: Mon Oct 10 2011 - 02:35:15 EST


2011/10/10 Borislav Petkov <bp@xxxxxxxxx>:
> On Sun, Oct 09, 2011 at 10:44:12PM -0700, Barry Song wrote:
>> From: Barry Song <baohua.song@xxxxxxx>
>>
>> patch "PM: HIBERNATION: add resume_wait param to support MMC-like devices
>> as resume file" add resume_wait param. this patch adds resume_delay so that
>> resume_wait/delay has the same model with root_wait/delay.
>>
>> Signed-off-by: Barry Song <baohua.song@xxxxxxx>
>> ---
>> ÂDocumentation/kernel-parameters.txt | Â Â3 +++
>> Âkernel/power/hibernate.c      Â|  14 ++++++++++++++
>> Â2 files changed, 17 insertions(+), 0 deletions(-)
>>
>> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
>> index 88a7b19..831bde2 100644
>> --- a/Documentation/kernel-parameters.txt
>> +++ b/Documentation/kernel-parameters.txt
>> @@ -2240,6 +2240,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
>> Â Â Â Â Â Â Â Â Â Â Â in <PAGE_SIZE> units (needed only for swap files).
>> Â Â Â Â Â Â Â Â Â Â Â See ÂDocumentation/power/swsusp-and-swap-files.txt
>>
>> + Â Â resumedelay= Â Â[HIBERNATION] Delay (in seconds) to pause before attempting to
>> + Â Â Â Â Â Â Â Â Â Â read the resume files
>> +
>>    resumewait   Â[HIBERNATION] Wait (indefinitely) for resume device to show up.
>> Â Â Â Â Â Â Â Â Â Â Â Useful for devices that are detected asynchronously
>> Â Â Â Â Â Â Â Â Â Â Â (e.g. USB and MMC devices).
>> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
>> index b3da53c..f73a00e 100644
>> --- a/kernel/power/hibernate.c
>> +++ b/kernel/power/hibernate.c
>> @@ -33,6 +33,7 @@
>> Âstatic int nocompress = 0;
>> Âstatic int noresume = 0;
>> Âstatic int resume_wait = 0;
>> +static int resume_delay = 0;
>
> These static variables get zeroed needlessly and checkpatch actually
> warns about that. Maybe fix that up while you're there?

yes. right. i initilized it to 0 to keep consistent coding style with
the context because there were other variants doing that.
i'd like to delete all initialization together as a seperate patch. Or
do you want to do that?

>
> Thanks.
>
> --
> Regards/Gruss,
> Â ÂBoris.
-barry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/