Re: [PATCH 1/3] mmc: replacing hardcoded value for runtime PM suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks!

On 10/13/16, 10:36 AM, "Ulf Hansson" <ulf.hansson@xxxxxxxxxx> wrote:

>On 1 September 2016 at 07:12, alex.lemberg <alex.lemberg@xxxxxxxxxxx> wrote:
>> Add MMC_AUTOSUSPEND_DELAY_MS define
>>
>> Signed-off-by: alex.lemberg <alex.lemberg@xxxxxxxxxxx>
>> ---
>>  drivers/mmc/card/block.c | 3 ++-
>>  include/linux/mmc/host.h | 2 ++
>>  2 files changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
>> index 48a5dd7..f4386ed 100644
>> --- a/drivers/mmc/card/block.c
>> +++ b/drivers/mmc/card/block.c
>> @@ -2610,7 +2610,8 @@ static int mmc_blk_probe(struct mmc_card *card)
>>                         goto out;
>>         }
>>
>> -       pm_runtime_set_autosuspend_delay(&card->dev, 3000);
>> +       pm_runtime_set_autosuspend_delay(&card->dev,
>> +               MMC_RUNTIME_SUSPEND_DELAY_MS);
>>         pm_runtime_use_autosuspend(&card->dev);
>>
>>         /*
>> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
>> index aa4bfbf..8cb8218 100644
>> --- a/include/linux/mmc/host.h
>> +++ b/include/linux/mmc/host.h
>> @@ -22,6 +22,8 @@
>>  #include <linux/mmc/mmc.h>
>>  #include <linux/mmc/pm.h>
>>
>> +#define MMC_RUNTIME_SUSPEND_DELAY_MS   3000
>> +
>>  struct mmc_ios {
>>         unsigned int    clock;                  /* clock rate */
>>         unsigned short  vdd;
>> --
>> 1.9.1
>>
>
>Actually, I don't mind having hardcoded values like this one directly
>in the code. Especially since it's used only at one single place and
>because it's not a magic number.
>
>Although, if really feel strong about this, I can apply it.
>
>Kind regards
>Uffe

��.n��������+%������w��{.n�����{��i��)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux