[PATCH] MMCI: use _cansleep GPIO functions

Sergei Shtylyov sshtylyov at mvista.com
Sat Sep 11 10:11:01 EDT 2010


I wrote:

>> From: Linus Walleij <linus.walleij at stericsson.com>
>> Date: Sat, 11 Sep 2010 13:36:20 +0200
>> Subject: [PATCH] MMCI: use _cansleep GPIO functions

>> Currently the kernel is screaming about slowpath at me for the
>> wp/cd callbacks. Swicth to the _cansleep variants so as to silence
>> this.

>> Signed-off-by: Linus Walleij <linus.walleij at stericsson.com>
>> ---
>>  drivers/mmc/host/mmci.c |    5 +++--
>>  1 files changed, 3 insertions(+), 2 deletions(-)

>> diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
>> index f0c7313..c5fbf19 100644
>> --- a/drivers/mmc/host/mmci.c
>> +++ b/drivers/mmc/host/mmci.c
> [...]
>>  static int mmci_get_cd(struct mmc_host *mmc)
>> @@ -629,7 +629,8 @@ static int mmci_get_cd(struct mmc_host *mmc)
>>
>>          status = plat->status(mmc_dev(host->mmc));
>>      } else
>> -        status = !!gpio_get_value(host->gpio_cd) ^ plat->cd_invert;
>> +        status = !!gpio_get_value_cansleep(host->gpio_cd)
>> +            ^ plat->cd_invert;

>    Should be no space between ^ and operand, no?

    Oops, I've mixed it with ~. Still, I'd have left ^ on the first line.

WBR, Sergei




More information about the linux-arm-kernel mailing list